TheDesk Miho (ver.14)

This commit is contained in:
cutls 2018-02-18 03:44:20 +09:00
parent 04fd065eb8
commit 51097abce6
12 changed files with 55 additions and 39 deletions

View File

@ -9,6 +9,18 @@
iframe { iframe {
max-width:100%; max-width:100%;
} }
@media screen and (max-width: 600px) {
.mobile #timeline-container {
display: block;
overflow-x: hidden;
}
.mobile .box {
width: 100vw;
}
.mobile .fixed-action-btn {
position: absolute;
}
}
.box { .box {
overflow: hidden; overflow: hidden;
min-width: 300px; min-width: 300px;

View File

@ -23,7 +23,7 @@
<script type="text/javascript" src="./js/common/keyshortcut.js"></script> <script type="text/javascript" src="./js/common/keyshortcut.js"></script>
<script type="text/javascript" src="./js/common/modal.js"></script> <script type="text/javascript" src="./js/common/modal.js"></script>
<script> <script>
var ver="Miho (ver.13)"; var ver="Miho (ver.14)";
//betaを入れるとバージョンチェックしない //betaを入れるとバージョンチェックしない
//var ver="beta"; //var ver="beta";
var acct_id=0; var acct_id=0;
@ -112,7 +112,7 @@ var tlid=0;
<a onclick="zoomBox()" class="setting nex"><i class="material-icons nex mize" title="ボックスの拡大・縮小(E)">zoom_out_map</i></a> <a onclick="zoomBox()" class="setting nex"><i class="material-icons nex mize" title="ボックスの拡大・縮小(E)">zoom_out_map</i></a>
<a onclick="srcToggle()" class="setting nex"><i class="material-icons nex mize" title="検索">search</i></a> <a onclick="srcToggle()" class="setting nex"><i class="material-icons nex mize" title="検索">search</i></a>
<a href="setting.html" class="setting nex"><i class="material-icons nex mize" title="設定">settings</i></a> <a href="setting.html" class="setting nex"><i class="material-icons nex mize" title="設定">settings</i></a>
<a href="acct.html"><i class="material-icons nex mize" title="アカウント管理">account_circle</i></a> <a onclick="profShow()"><i class="material-icons nex pointer mize" title="選択中のプロフィール表示">account_circle</i></a>
<a href="index.html" class="setting nex mize"><i class="material-icons nex" title="スーパーリロード">refresh</i></a> <a href="index.html" class="setting nex mize"><i class="material-icons nex" title="スーパーリロード">refresh</i></a>
<a onclick="window.open('https://astarte.thedesk.top');" class="setting nex mize" target="_blank" id="ranking-btn" style="display:none;"><i class="material-icons nex" title="アスタルテランキング">timeline</i></a> <a onclick="window.open('https://astarte.thedesk.top');" class="setting nex mize" target="_blank" id="ranking-btn" style="display:none;"><i class="material-icons nex" title="アスタルテランキング">timeline</i></a>
<a onclick="Rtoggle()" class="setting nex mize" id="radio-btn"><i class="material-icons nex" title="Radio(Select/Pause)">play_circle_outline</i></a><span id="radio-sta" class="radio"></span> <a onclick="Rtoggle()" class="setting nex mize" id="radio-btn"><i class="material-icons nex" title="Radio(Select/Pause)">play_circle_outline</i></a><span id="radio-sta" class="radio"></span>
@ -130,7 +130,7 @@ var tlid=0;
<button class="btn waves-effect" onclick="Rselect()">Presets</button> <button class="btn waves-effect" onclick="Rselect()">Presets</button>
</div> </div>
<div class="row" style="margin-bottom:0;"> <div class="row" style="margin-bottom:0;">
<span class="sml gray mize">画面内どこでもドラッグ・アンド・ドロップできます。</span><span class="mize"><br>アカウント選択<!--[<a onclick="profShow()" class="pointer sml">プロフィール確認・編集</a>]</span>--><br></span> <span class="sml gray mize">画面内どこでもドラッグ・アンド・ドロップできます。</span><span class="mize"><br>アカウント選択</span><br></span>
<div class="input-field mize"> <div class="input-field mize">
<select id="post-acct-sel" class="acct-sel" onchange="mdCheck()"> <select id="post-acct-sel" class="acct-sel" onchange="mdCheck()">
@ -227,7 +227,7 @@ var tlid=0;
</div> </div>
</div> </div>
<!--最小化--> <!--最小化-->
<div class="fixed-action-btn horizontal mize" id="menu-btn" onclick="show()"> <div class="fixed-action-btn horizontal" id="menu-btn" onclick="show()">
<a class="btn-floating btn-large red"> <a class="btn-floating btn-large red">
<i class="large material-icons">mode_edit</i> <i class="large material-icons">mode_edit</i>
</a> </a>

View File

@ -302,6 +302,7 @@ function refresh(target) {
localStorage.setItem("user_" + target, json["acct"]); localStorage.setItem("user_" + target, json["acct"]);
localStorage.setItem("user-id_" + target, json["id"]); localStorage.setItem("user-id_" + target, json["id"]);
console.log("user-id_" + target+":"+json["id"]) console.log("user-id_" + target+":"+json["id"])
console.log(localStorage.getItem("user-id_"+target));
localStorage.setItem("prof_" + target, json["avatar"]); localStorage.setItem("prof_" + target, json["avatar"]);
obj[target] = ref; obj[target] = ref;
console.log(obj); console.log(obj);

View File

@ -5,19 +5,22 @@
var url = $a.attr('href'); var url = $a.attr('href');
if (!url) { if (!url) {
var url = $a.parent().attr('href'); var url = $a.parent().attr('href');
} }
var urls = url.match(/https?:\/\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/); var urls=[];
//hrefがhttp/httpsならブラウザで if(url){
if (urls[0]) { urls = url.match(/https?:\/\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/);
const { //hrefがhttp/httpsならブラウザで
shell if (urls[0]) {
} = require('electron'); const {
shell
} = require('electron');
shell.openExternal(url); shell.openExternal(url);
} else { } else {
location.href = url; location.href = url;
} }
}
return false; return false;
}); });

View File

@ -156,7 +156,9 @@ function cbCopy(mode){
if(mode=="emb"){ if(mode=="emb"){
var emb='<iframe src="'+url+'/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400"></iframe><script src="https://'+domain+'/embed.js" async="async"></script>'; var emb='<iframe src="'+url+'/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400"></iframe><script src="https://'+domain+'/embed.js" async="async"></script>';
execCopy(emb) execCopy(emb)
Materialize.toast("埋め込みHTMLをコピーしました", 1500);
}else{ }else{
execCopy(url) execCopy(url)
Materialize.toast("トゥートURLをコピーしました", 1500);
} }
} }

View File

@ -146,7 +146,7 @@ function parseNotf(obj, popup, tlid, acct_id) {
var emoji = toot.emojis[key5]; var emoji = toot.emojis[key5];
var shortcode = emoji.shortcode; var shortcode = emoji.shortcode;
var emoji_url = '<img src="' + emoji.url + var emoji_url = '<img src="' + emoji.url +
'" style="width:2em" class="emoji-img">'; '" style="width:1em" class="emoji-img">';
var regExp = new RegExp(":" + shortcode + ":", "g"); var regExp = new RegExp(":" + shortcode + ":", "g");
content = content.replace(regExp, emoji_url); content = content.replace(regExp, emoji_url);
}); });
@ -229,13 +229,13 @@ function parseNotf(obj, popup, tlid, acct_id) {
'" class="cvo ' + fav_app + ' ' + rt_app + '" class="cvo ' + fav_app + ' ' + rt_app +
'" style="padding-top:5px;" notf-id="' + eachobj.id + '">' + '" style="padding-top:5px;" notf-id="' + eachobj.id + '">' +
'<span class="gray sharesta">' + noticetext + '<span class="gray sharesta">' + noticetext +
'<br><span class="cbadge"><i class="fa fa-clock-o"></i>' + date(eachobj.created_at, '<span class="cbadge right"><i class="fa fa-clock-o"></i>' + date(eachobj.created_at,
datetype) + '</span></span>' + datetype) + '</span></span>' +
'<div style="padding:0; margin:0; width:400px; max-width:100%; display:flex; align-items:flex-end;">' + '<div style="padding:0; margin:0; width:400px; max-width:100%; display:flex; align-items:flex-end;">' +
'<div style="flex-basis:40px;"><a onclick="udg(\'' + toot.account.id + '<div style="flex-basis:40px;"><a onclick="udg(\'' + toot.account.id +
'\',\'' + acct_id + '\');" user="' + toot.account.acct + '" class="udg">' + '\',\'' + acct_id + '\');" user="' + toot.account.acct + '" class="udg">' +
'<img src="' + toot.account.avatar + '<img src="' + toot.account.avatar +
'" width="20" class="prof-img" user="' + toot.account.acct + '" width="40" class="prof-img" user="' + toot.account.acct +
'"></a></div>' + '"></a></div>' +
'<div style="flex-grow:3; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">' + '<div style="flex-grow:3; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">' +
toot.account.display_name + '</div>' + toot.account.display_name + '</div>' +

View File

@ -35,7 +35,7 @@
var acct = obj[key]; var acct = obj[key];
localStorage.setItem("name_" + key, acct.name); localStorage.setItem("name_" + key, acct.name);
localStorage.setItem("user_" + key, acct.user); localStorage.setItem("user_" + key, acct.user);
localStorage.setItem("user-id_" + key, acct.user); localStorage.setItem("user-id_" + key, acct.id);
localStorage.setItem("prof_" + key, acct.prof); localStorage.setItem("prof_" + key, acct.prof);
localStorage.setItem("domain_" + key, acct.domain); localStorage.setItem("domain_" + key, acct.domain);
localStorage.setItem(acct.domain + "_at", acct.at); localStorage.setItem(acct.domain + "_at", acct.at);

View File

@ -311,12 +311,3 @@ function showDom(more, acct_id) {
}); });
} }
//プロフ編集
function profeditShow(json) {
$("#his-name-val").val(json.display_name);
var des = json.note;
des = des.replace(/<br \/>/g, "\n");
des = des.replace("<p>", "");
des = des.replace("</p>", "");
$("#his-des-val").val(des);
}

View File

@ -60,7 +60,12 @@ function udg(user, acct_id) {
localStorage.setItem("history" , user); localStorage.setItem("history" , user);
} }
//自分の時 //自分の時
if (json.acct == localStorage.getItem("user")) { if (json.acct == localStorage.getItem("user_"+acct_id)) {
$("#his-name-val").val(json.display_name);
var des = json.note;
des = des.replace(/<br \/>/g, "\n")
des = $.strip_tags(des);
$("#his-des-val").val(des);
$("#his-follow-btn").hide(); $("#his-follow-btn").hide();
$("#his-block-btn").hide(); $("#his-block-btn").hide();
$("#his-mute-btn").hide(); $("#his-mute-btn").hide();
@ -74,7 +79,6 @@ function udg(user, acct_id) {
showMut('', acct_id); showMut('', acct_id);
showDom('', acct_id); showDom('', acct_id);
showReq('', acct_id); showReq('', acct_id);
profeditShow(json);
} else { } else {
relations(user, acct_id); relations(user, acct_id);
} }

View File

@ -78,17 +78,20 @@ ipc.on('nano', function(e, x, y) {
}) })
ipc.on('download-btn', (e, args) => { ipc.on('download-btn', (e, args) => {
if(args=="true"){ if(args=="true"){
dialog.showOpenDialog({ dialog.showSaveDialog(null, {
properties: ['openDirectory'] title: '保存',
}, function(files) { properties: ['openFile', 'createDirectory'],
dl(files[0]); defaultPath: 'TheDesk-win32-x64.zip'
}) }, (savedFiles) => {
dl(savedFiles[0]);
});
}else{ }else{
dl(); dl();
} }
}); });
function dl(files){ function dl(files){
console.log(files);
mainWindow.webContents.send('comp', "ダウンロードを開始します。"); mainWindow.webContents.send('comp', "ダウンロードを開始します。");
const opts = { const opts = {
directory:files, directory:files,

View File

@ -1,6 +1,6 @@
{ {
"name": "TheDesk", "name": "TheDesk",
"version": "11.12.0", "version": "11.14.0",
"description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです", "description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

View File

@ -1 +1 @@
{"desk":"Miho (ver.13)","date":"2018-02-18","detail":"内部V:11.13.0|トゥートボックス最小化、フォントサイズ変更、メディアフィルター、ワンクリックでトゥートURL/埋め込みコピー、通知が5重に来るバグ修正"} {"desk":"Miho (ver.14)","date":"2018-02-18","detail":"内部V:11.14.0|14:アップデータの改良とバグ修正/13:トゥートボックス最小化、フォントサイズ変更、メディアフィルター、ワンクリックでトゥートURL/埋め込みコピー、通知が5重に来るバグ修正"}