From 5134dd274be3db167dddfd180c4e4ca8ee3c7379 Mon Sep 17 00:00:00 2001 From: Cutls Date: Thu, 28 Feb 2019 02:02:23 +0900 Subject: [PATCH] TheDesk Miria (17.0.2) --- app/css/tl.css | 3 +++ app/js/lang/lang.en.js | 1 + app/js/lang/lang.ja.js | 1 + app/js/platform/end.js | 10 +++++++++- app/js/platform/twitter.js | 2 +- app/js/tl/filter.js | 28 ++++++++++++++++++++++++++++ app/js/tl/notification.js | 1 + app/js/tl/parse.js | 1 - app/js/tl/tl.js | 2 +- app/js/ui/layout.js | 7 ++++++- app/main.js | 1 + app/package.json | 6 +++--- app/view/en/index.html | 9 ++++++--- app/view/ja/index.html | 9 ++++++--- app/view/make/index.sample.html | 7 +++++-- app/view/ps/index.html | 9 ++++++--- 16 files changed, 78 insertions(+), 19 deletions(-) diff --git a/app/css/tl.css b/app/css/tl.css index f28bd8ca..5633cf0f 100644 --- a/app/css/tl.css +++ b/app/css/tl.css @@ -138,6 +138,9 @@ iframe { .media-filter .nomedia{ display:none; } +.bt-filter .shared{ + display:none; +} .cvo { user-select: text; padding-left: 5px; diff --git a/app/js/lang/lang.en.js b/app/js/lang/lang.en.js index 11b94b06..3c40e480 100644 --- a/app/js/lang/lang.en.js +++ b/app/js/lang/lang.en.js @@ -117,6 +117,7 @@ var lang={ "lang_layout_dm":"Direct Message", "lang_layout_webviewmode":"Prefer WebView", "lang_excluded":"Excluded type of notification", + "lang_layout_excludingbt":"Exclude Boosts", //ui/spotify.js "lang_spotify_img":"Attach an album artwork", "lang_spotify_imgno":"Not attach an album artwork", diff --git a/app/js/lang/lang.ja.js b/app/js/lang/lang.ja.js index cbc5bf7f..ea71a5ea 100644 --- a/app/js/lang/lang.ja.js +++ b/app/js/lang/lang.ja.js @@ -118,6 +118,7 @@ var lang={ "lang_layout_dm":"ダイレクトメッセージ", "lang_layout_webviewmode":"WebView優先", "lang_excluded":"除外する通知", + "lang_layout_excludingbt":"ブーストを除外", //ui/spotify.js "lang_spotify_img":"アルバムアートワークを添付します。", "lang_spotify_imgno":"アルバムアートワークを添付しません。", diff --git a/app/js/platform/end.js b/app/js/platform/end.js index 57c79d70..8dc28f14 100644 --- a/app/js/platform/end.js +++ b/app/js/platform/end.js @@ -172,4 +172,12 @@ function opendev(){ keyCode: '2' }); */ -} \ No newline at end of file +} + +var webview = document.getElementById('webview'); +const { + shell +} = require('electron'); +webview.addEventListener('new-window', function(e) { + shell.openExternal(e.url); +}); \ No newline at end of file diff --git a/app/js/platform/twitter.js b/app/js/platform/twitter.js index 4f3b1fc6..85daf7e5 100644 --- a/app/js/platform/twitter.js +++ b/app/js/platform/twitter.js @@ -316,4 +316,4 @@ function tjDeckStart() { if (document.querySelector(".js-app-columns")) tjDeckStart(); else var timer = setInterval(function () { document.querySelector(".js-app-columns") ? (tjDeckStart(), clearInterval(timer)) : console.log("まだロード中") -}, 500); \ No newline at end of file +}, 500); diff --git a/app/js/tl/filter.js b/app/js/tl/filter.js index 63ddfe32..2a738f85 100644 --- a/app/js/tl/filter.js +++ b/app/js/tl/filter.js @@ -14,6 +14,21 @@ function mediaToggle(tlid) { $("#timeline_"+tlid).addClass("media-filter") } } +//各TL上方のBT[On/Off] +function ebtToggle(tlid) { + var ebt = localStorage.getItem("ebt_" + tlid); + if (ebt) { + localStorage.removeItem("ebt_" + tlid); + $("#sta-bt-" + tlid).text("Off"); + $("#sta-bt-" + tlid).css("color",'red'); + $("#timeline_"+tlid).removeClass("bt-filter") + } else { + localStorage.setItem("ebt_" + tlid, "true"); + $("#sta-bt-" + tlid).text("On"); + $("#sta-bt-" + tlid).css("color",'#009688'); + $("#timeline_"+tlid).addClass("bt-filter") + } +} //各TL上方のMedia[On/Off]をチェック function mediaCheck(tlid) { var media = localStorage.getItem("media_" + tlid); @@ -27,6 +42,19 @@ function mediaCheck(tlid) { $("#timeline_"+tlid).removeClass("media-filter") } } +//各TL上方のBT[On/Off]をチェック +function ebtCheck(tlid) { + var ebt = localStorage.getItem("ebt_" + tlid); + if (ebt) { + $("#sta-bt-" + tlid).text("On"); + $("#sta-bt-" + tlid).css("color",'#009688'); + $("#timeline_"+tlid).addClass("bt-filter") + } else { + $("#sta-bt-" + tlid).text("Off"); + $("#sta-bt-" + tlid).css("color",'red'); + $("#timeline_"+tlid).removeClass("bt-filter") + } +} /* 削除追跡*/ function catchToggle(tlid) { var catchck = localStorage.getItem("catch_" + tlid); diff --git a/app/js/tl/notification.js b/app/js/tl/notification.js index 6ee51f95..54cf39a6 100644 --- a/app/js/tl/notification.js +++ b/app/js/tl/notification.js @@ -171,6 +171,7 @@ function notfColumn(acct_id, tlid, sys){ if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){ $(".tl[data-notf=" + acct_id +"]").prepend(templete); } + $(".notf-timeline[data-acct=" + acct_id +"]").prepend(templete); jQuery("time.timeago").timeago(); } else if (type == "delete") { $("[toot-id=" + obj + "]").hide(); diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index bed84598..e4c5e327 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -76,7 +76,6 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { //Cards var card = localStorage.getItem("card_" + tlid); - if (!sent) { var sent = 500; } diff --git a/app/js/tl/tl.js b/app/js/tl/tl.js index 6e2d2b6c..b47d9374 100644 --- a/app/js/tl/tl.js +++ b/app/js/tl/tl.js @@ -80,6 +80,7 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) { if(type!="noauth"){ req.i=at; } + if(type=="local-media"||type=="pub-media"){ req.mediaOnly=true; } @@ -672,5 +673,4 @@ function reconnector(tlid,type,acct_id,data,mode){ } Materialize.toast(lang.lang_tl_reconnect, 2000); } - strAliveInt() \ No newline at end of file diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index 988bdbd2..e1909bc1 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -134,6 +134,10 @@ function parseColumn() { ' '+ ' '+ '
'; + }else if(acct.type=="home"){ + var exclude='Off'+lang.lang_layout_excludingbt+'
'; }else{ var exclude=""; } @@ -159,7 +163,7 @@ function parseColumn() { ')" class="setting nex">hearingOn'+lang.lang_layout_tts +'TL
low_priority'+lang.lang_layout_reconnect+'
'+lang.lang_layout_headercolor +'
'+lang.lang_layout_nodata +'
'; + '" class="tl '+acct.type+'-timeline" tlid="' + key + '" data-type="' + acct.type + '" data-acct="'+acct.domain+'">
'+lang.lang_layout_nodata +'
'; $("#timeline-container").append(html); localStorage.removeItem("pool_" + key); if (acct.data) { @@ -180,6 +184,7 @@ function parseColumn() { } tl(acct.type, data, acct.domain, key, delc,voice,""); cardCheck(key); + ebtCheck(key); mediaCheck(key); catchCheck(key); voiceCheck(key); diff --git a/app/main.js b/app/main.js index b0c7dffc..54388bb4 100644 --- a/app/main.js +++ b/app/main.js @@ -596,4 +596,5 @@ object_array_sort(fonts, 'family', 'asc', function(fonts_sorted){ }); + app.setAsDefaultProtocolClient('thedesk') diff --git a/app/package.json b/app/package.json index 8d1fff60..391cdb0a 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "thedesk", - "version": "17.0.1", + "version": "17.0.2", "description": "TheDesk is a Mastodon client for PC.", "main": "main.js", "scripts": { @@ -71,9 +71,9 @@ "target": "dmg" }, "electronDownload": { - "version": "3.0.10" + "version": "4.0.5" }, - "electronVersion": "3.0.10" + "electronVersion": "4.0.5" }, "devDependencies": { "electron": "^4.0.5", diff --git a/app/view/en/index.html b/app/view/en/index.html index 8799ce9d..01c2f1bf 100644 --- a/app/view/en/index.html +++ b/app/view/en/index.html @@ -32,7 +32,7 @@