From faa8b70aff67c944081bf208fbb96b05788c6214 Mon Sep 17 00:00:00 2001 From: cutls Date: Tue, 17 Jul 2018 00:39:06 +0900 Subject: [PATCH] TheDesk Mio (15.9.0) --- LATEST.md | 20 +-- app/css/tl.css | 24 ++- app/index.html | 57 ++++++- app/js/login/login.js | 1 + app/js/post/status.js | 28 ++++ app/js/tl/datails.js | 22 ++- app/js/tl/filter.js | 318 ++++++++++++++++++++++++++++++++++++ app/js/tl/mix.js | 49 ++++-- app/js/tl/notification.js | 13 +- app/js/tl/parse.js | 34 +++- app/js/tl/tag.js | 2 +- app/js/tl/tl.js | 34 ++-- app/js/ui/layout.js | 19 ++- app/js/userdata/his-data.js | 10 +- app/package.json | 2 +- 15 files changed, 567 insertions(+), 66 deletions(-) diff --git a/LATEST.md b/LATEST.md index 480c39fb..ce9cbc52 100644 --- a/LATEST.md +++ b/LATEST.md @@ -1,19 +1,19 @@ ## For Astarte(kirishima.cloud), My Primary Instance -TheDesk :thedesk: Mio (15.8.0) -・Glance TLの不具合解消 -・フォントが変更可能に -・同一インスタンスで複数垢ログインに対応 -・カラーテーマの追加 +TheDesk :thedesk: Mio (15.9.0) +・フィルター機能に対応 +・削除して再編集に対応 +・削除追跡(削除されたトゥートが画面から消えずに背景色のみ変化します。) +・通知が表示されないバグ・削除時に境界線が太くなる現象の修正など ほか https://thedesk.top :github: https://github.com/cutls/TheDesk #Desk #DeskUpdate ## For Other Instances -PCクライアントTheDesk Mio (15.8.0) -・Glance TLの不具合解消 -・フォントが変更可能に -・同一インスタンスで複数垢ログインに対応 -・カラーテーマの追加 +PCクライアントTheDesk Mio (15.9.0) +・フィルター機能に対応 +・削除して再編集に対応 +・削除追跡(削除されたトゥートが画面から消えずに背景色のみ変化します。) +・通知が表示されないバグ・削除時に境界線が太くなる現象の修正など https://thedesk.top \ No newline at end of file diff --git a/app/css/tl.css b/app/css/tl.css index c898997d..7337f491 100644 --- a/app/css/tl.css +++ b/app/css/tl.css @@ -106,6 +106,7 @@ iframe { } .cvo { padding-left: 5px; + border-bottom:0.5px solid; padding-right: 2px; word-break: break-all; width: 100%; @@ -169,8 +170,15 @@ grid-area: toot; } .area-actions { -margin:2px; -grid-area: actions; + padding:0; + margin:0; + top:-20px; + display:flex; + justify-content:space-around; + width:300px; + max-width:100%; + margin:2px; + grid-area: actions; } .area-vis { margin:2px; @@ -338,6 +346,18 @@ p:not(:last-child){ .modal-footer{ background-color:var(--box); } +.ballons{ + background-color: var(--box); + position:absolute; + bottom:0px; + right:0px; +} .btn-flat{ color:var(--color); +} +.toot a span.ellipsis:after{ + content:"..."; +} +.toot a:not(.mention) span:last-of-type{ + display:none; } \ No newline at end of file diff --git a/app/index.html b/app/index.html index 4e0520dc..0d97a6d2 100644 --- a/app/index.html +++ b/app/index.html @@ -113,19 +113,58 @@ var tlid=0;
- アカウント選択 -
+
- +
-

+
+ +
+

+ +
+
+ + +
+
+ +
+
+ +
+ 適用範囲
+ + + + + + + +
+ オプション
+ +
+ 非ラテン系の文字列では「単語マッチ」は推奨されません。
+ +
+ 「除外」時マッチしたトゥートは非可逆的に除外され、削除後も閲覧できません。
+ 有効期限(あと)未指定(または0分)で「無制限」になります。仕様上数値の正確性を保証できません。

+ 日 + 時間 + 分 +
+ Integrated TL/Plus TLは、公開/ホームのフィルターワードが合算されて適応されます。どちらか一方の指定でも非表示になります。 +
@@ -177,6 +216,12 @@ var tlid=0; リスト
+
refresh diff --git a/app/js/login/login.js b/app/js/login/login.js index 42399368..c231937f 100644 --- a/app/js/login/login.js +++ b/app/js/login/login.js @@ -351,6 +351,7 @@ function multiSelector() { }else{ Object.keys(obj).forEach(function(key) { var acct = obj[key]; + var list = key * 1 + 1; if (key == last) { sel = "selected"; diff --git a/app/js/post/status.js b/app/js/post/status.js index cada5960..64160cff 100644 --- a/app/js/post/status.js +++ b/app/js/post/status.js @@ -226,6 +226,34 @@ function del(id, acct_id) { } } } +//redraft +function redraft(id, acct_id){ + if(confirm("削除して再編集しますか?そのトゥートの全てのデータがリセットされます。この機能はベータ版です。画像は~v2.4.1で破棄されます。")){ + show(); + del(id, acct_id); + $("#post-acct-sel").prop("disabled", true); + var medias=$("[toot-id="+id+"]").attr("data-medias"); + var vismode=$("[toot-id="+id+"] .vis-data").attr("data-vis"); + vis(vismode); + $("#media").val(medias); + var ct=medias.split(",").length; + $("[toot-id="+id+"] img.toot-img").each(function(i, elem) { + if(i'); + } + }); + var html=$("[toot-id="+id+"] .toot").html(); + html = html.replace(/^

(.+)<\/p>$/,"$1"); + html = html.replace(//, "\n"); + html = html.replace(/

/, "\n"); + html = html.replace(/<\/p>/, "\n"); + html = html.replace(//g, "$1"); + html=$.strip_tags(html); + $("#textarea").val(html); + } +} //ピン留め function pin(id, acct_id) { if ($("#pub_" + id).hasClass("pined")) { diff --git a/app/js/tl/datails.js b/app/js/tl/datails.js index 34b7996c..bedafb87 100644 --- a/app/js/tl/datails.js +++ b/app/js/tl/datails.js @@ -70,8 +70,17 @@ function replyTL(id, acct_id) { todo(error); console.error(error); }).then(function(json) { - var templete = parse([json], '', acct_id); + if(localStorage.getItem("filter_"+ acct_id)!="undefined"){ + var mute=getFilterType(JSON.parse(localStorage.getItem("filter_"+ acct_id)),"thread"); + }else{ + var mute=[]; + } + console.log(mute); + var templete = parse([json], '', acct_id,"","",mute); $("#toot-reply").prepend(templete); + $("#toot-reply .hide").html("フィルターされました。"); + $("#toot-reply .by_filter").css("display","block"); + $("#toot-reply .by_filter").removeClass("hide"); jQuery("time.timeago").timeago(); if (json.in_reply_to_id) { replyTL(json.in_reply_to_id, acct_id); @@ -96,9 +105,16 @@ function context(id, acct_id) { todo(error); console.error(error); }).then(function(json) { - var templete = parse(json.descendants, '', acct_id); + if(localStorage.getItem("filter_"+ acct_id)!="undefined"){ + var mute=getFilterType(JSON.parse(localStorage.getItem("filter_"+ acct_id)),"thread"); + }else{ + var mute=[]; + } + var templete = parse(json.descendants, '', acct_id,"","",mute); $("#toot-after").html(templete); - + $("#toot-after .hide").html("フィルターされました。"); + $("#toot-after .by_filter").css("display","block"); + $("#toot-after .by_filter").removeClass("hide"); jQuery("time.timeago").timeago(); }); } diff --git a/app/js/tl/filter.js b/app/js/tl/filter.js index 398d7c1e..cd0490a9 100644 --- a/app/js/tl/filter.js +++ b/app/js/tl/filter.js @@ -1,3 +1,4 @@ +/*メディアフィルター機能*/ //各TL上方のMedia[On/Off] function mediaToggle(tlid) { var media = localStorage.getItem("media_" + tlid); @@ -26,3 +27,320 @@ function mediaCheck(tlid) { $("#timeline_"+tlid).removeClass("media-filter") } } +/* 削除追跡*/ +function catchToggle(tlid) { + var catchck = localStorage.getItem("catch_" + tlid); + if (catchck) { + localStorage.removeItem("catch_" + tlid); + $("#sta-del-" + tlid).text("Off"); + $("#sta-del-" + tlid).css("color",'red'); + parseColumn(); + } else { + localStorage.setItem("catch_" + tlid, "true"); + $("#sta-del-" + tlid).text("On"); + $("#sta-del-" + tlid).css("color",'#009688'); + $("#timeline_"+tlid).addClass("media-filter"); + parseColumn(); + } +} +function catchCheck(tlid) { + var catchck = localStorage.getItem("catch_" + tlid); + if (catchck) { + $("#sta-del-" + tlid).text("On"); + $("#sta-del-" + tlid).css("color",'#009688'); + } else { + $("#sta-del-" + tlid).text("Off"); + $("#sta-del-" + tlid).css("color",'red'); + } +} +function catchCheck(tlid) { + var catchck = localStorage.getItem("catch_" + tlid); + if (catchck) { + $("#sta-del-" + tlid).text("On"); + $("#sta-del-" + tlid).css("color",'#009688'); + } else { + $("#sta-del-" + tlid).text("Off"); + $("#sta-del-" + tlid).css("color",'red'); + } +} +function delreset(tlid){ + $("[tlid=" + tlid + "] .by_delcatch").hide(); + $("[tlid=" + tlid + "] .by_delcatch").remove(); + +} +/*ワードフィルター機能*/ +function filterToggle(){ + if ($("#filter-box").hasClass("hide")) { + $("#filter-box").removeClass("hide"); + $("#filter-box").addClass("show"); + $("#filter-box").css("top",$('#filter-tgl').offset().top-$('#filter-box').height()/2+"px"); + $("#filter-box").css("left",$('#filter-tgl').offset().left-410+"px"); + //フィルターロード + } else { + $("#filter-box").removeClass("show"); + $("#filter-box").addClass("hide") + } +} +function filter(){ + $("#filtered-words").html(""); + $("#filter-edit-id").val("") + var acct_id = $("#filter-acct-sel").val(); + var domain = localStorage.getItem("domain_" + acct_id); + var at = localStorage.getItem("acct_"+ acct_id + "_at"); + var start = "https://" + domain + "/api/v1/filters" + console.log(start) + fetch(start, { + method: 'GET', + headers: { + 'content-type': 'application/json', + 'Authorization': 'Bearer ' + at + }, + }).then(function(response) { + return response.json(); + }).catch(function(error) { + todo(error); + console.error(error); + }).then(function(json) { + console.log(json); + if (json) { + var filters = ""; + Object.keys(json).forEach(function(key) { + var filterword = json[key]; + var context = filterword.context.join(','); + filters = filters + filterword.phrase+'(for '+context+'):編集/削除
'; + }); + if(filters==""){ + filters="フィルターはありません
"; + } + $("#filtered-words").html(filters); + }else{ + $("#filtered-words").html("フィルターはありません"); + } + }); +} +function makeNewFilter(){ + var acct_id = $("#filter-acct-sel").val(); + var phr=$("#filter-add-word").val(); + var cont=[]; + if($("#home_filter:checked").val()){ + cont.push("home"); + } + if($("#local_filter:checked").val()){ + cont.push("public"); + } + if($("#notf_filter:checked").val()){ + cont.push("notifications"); + } + if($("#conv_filter:checked").val()){ + cont.push("thread"); + } + console.log(cont); + if(!cont.length){ + $("#filtered-words").html('Error:適応範囲を最低一つ以上チェックしてください。'); + } + var exc=$("#except_filter:checked").val(); + var who=$("#wholeword_filter:checked").val(); + var time=$("#days_filter").val()*24*60*60+$("#hours_filter").val()*60*60+$("#mins_filter").val()*60; + var domain = localStorage.getItem("domain_" + acct_id); + var at = localStorage.getItem("acct_"+ acct_id + "_at"); + if($("#filter-edit-id").val()){ + var start = "https://" + domain + "/api/v1/filters/"+$("#filter-edit-id").val(); + var method="PUT" + }else{ + var start = "https://" + domain + "/api/v1/filters" + var method="POST" + } + + var httpreq = new XMLHttpRequest(); + httpreq.open(method, start, true); + httpreq.setRequestHeader('Content-Type', 'application/json'); + httpreq.setRequestHeader('Authorization', 'Bearer ' + at); + httpreq.responseType = 'json'; + httpreq.send(JSON.stringify({ + phrase: phr, + context: cont, + irreversible: exc, + whole_word:who, + expires_in:time + })); + httpreq.onreadystatechange = function() { + if (httpreq.readyState == 4) { + var json = httpreq.response; + filter(); + filterUpdate(acct_id) + $("#filter-add-word").val(""); + $("#home_filter").prop("checked",false); + $("#local_filter").prop("checked",false); + $("#notf_filter").prop("checked",false); + $("#conv_filter").prop("checked",false); + $("#except_filter").prop("checked",false); + $("#wholeword_filter").prop("checked",false); + $("#days_filter").val("0"); + $("#hours_filter").val("0"); + $("#mins_filter").val("0"); + $("#add-filter-btn").text("追加"); + $("#filter-edit-id").val("") + } + } +} +function filterEdit(id,acct_id){ + $("#filter-add-word").val(""); + $("#home_filter").prop("checked",false); + $("#local_filter").prop("checked",false); + $("#notf_filter").prop("checked",false); + $("#conv_filter").prop("checked",false); + $("#except_filter").prop("checked",false); + $("#wholeword_filter").prop("checked",false); + $("#days_filter").val("0"); + $("#hours_filter").val("0"); + $("#mins_filter").val("0"); + $("#add-filter-btn").text("編集"); + $("#filter-edit-id").val(id); + var domain = localStorage.getItem("domain_" + acct_id); + var at = localStorage.getItem("acct_"+ acct_id + "_at"); + var start = "https://" + domain + "/api/v1/filters/"+id + console.log(start) + fetch(start, { + method: 'GET', + headers: { + 'content-type': 'application/json', + 'Authorization': 'Bearer ' + at + }, + }).then(function(response) { + return response.json(); + }).catch(function(error) { + todo(error); + console.error(error); + }).then(function(json) { + console.log(json); + if (json) { + var now = new Date() ; + now = now.getTime() ; + var now = Math.floor(now / 1000 ) ; + $("#filter-add-word").val(json.phrase); + Object.keys(json.context).forEach(function(key) { + var context = json.context[key]; + $("[value="+context+"]").prop("checked",true); + }); + if(json.irreversible){ + $("#except_filter").prop("checked",true); + } + if(json.whole_word){ + $("#wholeword_filter").prop("checked",true); + } + var expires=date(json.expires_at, 'unix')-now; + var mins=Math.floor(expires/60)%60; + var hours=Math.floor(expires/3600)%24; + var days=Math.floor(expires/3600/24); + $("#days_filter").val(days); + $("#hours_filter").val(hours); + $("#mins_filter").val(mins); + } + }); +} +function filterDel(id,acct_id){ + var domain = localStorage.getItem("domain_" + acct_id); + var at = localStorage.getItem("acct_"+ acct_id + "_at"); + var start = "https://" + domain + "/api/v1/filters/"+id; + var httpreq = new XMLHttpRequest(); + httpreq.open("DELETE", start, true); + httpreq.setRequestHeader('Content-Type', 'application/json'); + httpreq.setRequestHeader('Authorization', 'Bearer ' + at); + httpreq.responseType = 'json'; + httpreq.send(); + httpreq.onreadystatechange = function() { + if (httpreq.readyState == 4) { + var json = httpreq.response; + filter(); + filterUpdate(acct_id) + } + } +} +function getFilter(acct_id){ + var domain = localStorage.getItem("domain_" + acct_id); + var at = localStorage.getItem("acct_"+ acct_id + "_at"); + var start = "https://" + domain + "/api/v1/filters" + console.log(start) + fetch(start, { + method: 'GET', + headers: { + 'content-type': 'application/json', + 'Authorization': 'Bearer ' + at + }, + }).then(function(response) { + return response.json(); + }).catch(function(error) { + todo(error); + console.error(error); + }).then(function(json) { + localStorage.setItem("filter_"+ acct_id ,JSON.stringify(json)); + }); +} +function getFilterType(json,type){ + if(type=="local"){ + type="public"; + }else if(type=="list"){ + type="home"; + }else if(type=="notf"){ + type="notifi"; + } + var mutedfilters=[]; + Object.keys(json).forEach(function(key) { + var filterword = json[key]; + var phrases = filterword.phrase; + if(filterword.context.join(",").indexOf(type)!== -1){ + mutedfilters.push(phrases); + } + }); + return mutedfilters; +} +function filterUpdate(acct_id){ + var domain = localStorage.getItem("domain_" + acct_id); + var at = localStorage.getItem("acct_"+ acct_id + "_at"); + var start = "https://" + domain + "/api/v1/filters" + console.log(start) + fetch(start, { + method: 'GET', + headers: { + 'content-type': 'application/json', + 'Authorization': 'Bearer ' + at + }, + }).then(function(response) { + return response.json(); + }).catch(function(error) { + todo(error); + console.error(error); + }).then(function(json) { + localStorage.setItem("filter_"+ acct_id ,JSON.stringify(json)); + filterUpdateInternal(json,"home"); + filterUpdateInternal(json,"local"); + filterUpdateInternal(json,"notf"); + filterUpdateInternal(json,"pub"); + }); + + +} +function filterUpdateInternal(json,type){ + var home=getFilterType(json,type); + var wordmute = localStorage.getItem("word_mute"); + if(wordmute){ + var wordmute = JSON.parse(wordmute); + home = home.concat(wordmute); + } + if(home){ + $("[data-acct="+acct_id+"] [data-type="+type+"] .cvo").each(function(i, elem) { + var id=$(elem).attr("toot-id"); + $("[toot-id="+id+"]").removeClass("hide"); + var text=$(elem).find('.toot').html(); + Object.keys(home).forEach(function(key8) { + var word = home[key8]; + var regExp = new RegExp( word, "g" ); + if($.strip_tags(text).match(regExp)){ + $("[toot-id="+id+"]").addClass("hide"); + } + }); + }); + } +} \ No newline at end of file diff --git a/app/js/tl/mix.js b/app/js/tl/mix.js index 0ba08740..1a3d2b20 100644 --- a/app/js/tl/mix.js +++ b/app/js/tl/mix.js @@ -1,6 +1,6 @@ //Integrated TL -function mixtl(acct_id, tlid, type) { - console.log(type); +function mixtl(acct_id, tlid, type,delc) { + console.log(delc); localStorage.removeItem("morelock") localStorage.setItem("now", type); todo("Integrated TL Loading...(Local)"); @@ -48,11 +48,16 @@ function mixtl(acct_id, tlid, type) { var pkey=key*1+1; if(pkey'; }); + media_ids = media_ids.slice(0, -1) ; } else { viewer = ""; hasmedia = "nomedia"; @@ -473,10 +482,14 @@ function parse(obj, mix, acct_id, tlid, popup) { Object.keys(wordmute).forEach(function(key8) { var worde = wordmute[key8]; if(worde){ - var word=worde.tag; + if(worde.tag){ + var word=worde.tag; + }else{ + var word=worde + } var regExp = new RegExp( word, "g" ) ; if($.strip_tags(content).match(regExp)){ - boostback = "hide"; + boostback = "hide by_filter"; } } }); @@ -500,7 +513,7 @@ function parse(obj, mix, acct_id, tlid, popup) { } templete = templete + '

' + '
' + notice + home + '
' + @@ -527,7 +540,7 @@ function parse(obj, mix, acct_id, tlid, popup) { '' + '' + mentions + tags + '
' + '
'+ - '
' + + '
' + '
'+vis+'
'+ '' + '
' + '
' +trans+ + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートをピン留め">
' + +''+trans+ '' + '' + 'via ' + via + '
' + - '
' + divider; + ''; }); if (mix == "mix") { return [templete, local, times] diff --git a/app/js/tl/tag.js b/app/js/tl/tag.js index ba0480d2..3a46951b 100644 --- a/app/js/tl/tag.js +++ b/app/js/tl/tag.js @@ -10,7 +10,7 @@ if(location.search){ } //よく使うタグ function tagShow(tag){ - $("[data-tag="+tag+"]").toggleClass("hide"); + $("[data-tag="+decodeURI(tag)+"]").toggleClass("hide"); } //タグ追加 function tagPin(tag){ diff --git a/app/js/tl/tl.js b/app/js/tl/tl.js index 5ce68751..4522a9cb 100644 --- a/app/js/tl/tl.js +++ b/app/js/tl/tl.js @@ -1,5 +1,5 @@ //TL取得 -function tl(type, data, acct_id, tlid) { +function tl(type, data, acct_id, tlid, delc) { scrollevent(); localStorage.removeItem("morelock"); localStorage.removeItem("pool"); @@ -36,14 +36,14 @@ function tl(type, data, acct_id, tlid) { $("#notice_" + tlid).text("Integrated TL(" + localStorage.getItem( "user_" + acct_id) + "@" + domain + ")"); $("#notice_icon_" + tlid).text("merge_type"); - mixtl(acct_id, tlid, "integrated"); + mixtl(acct_id, tlid, "integrated",delc); return; }else if (type == "plus") { //Local+なら飛ばす $("#notice_" + tlid).text("Local+ TL(" + localStorage.getItem( "user_" + acct_id) + "@" + domain + ")"); $("#notice_icon_" + tlid).text("people_outline"); - mixtl(acct_id, tlid, "plus"); + mixtl(acct_id, tlid, "plus",delc); return; }else if (type == "notf") { //通知なら飛ばす @@ -89,18 +89,24 @@ function tl(type, data, acct_id, tlid) { todo(error); console.error(error); }).then(function(json) { - var templete = parse(json, type, acct_id, tlid); + if(localStorage.getItem("filter_"+ acct_id)!="undefined"){ + var mute=getFilterType(JSON.parse(localStorage.getItem("filter_"+ acct_id)),type); + }else{ + var mute=[]; + } + + var templete = parse(json, type, acct_id, tlid, "", mute); $("#timeline_" + tlid).html(templete); additional(acct_id, tlid); jQuery("time.timeago").timeago(); todc(); - reload(type, '', acct_id, tlid, data); + reload(type, '', acct_id, tlid, data, mute, delc); $(window).scrollTop(0); }); } //Streaming接続 -function reload(type, cc, acct_id, tlid, data) { +function reload(type, cc, acct_id, tlid, data, mute, delc) { if (!type) { var type = localStorage.getItem("now"); } @@ -157,13 +163,19 @@ function reload(type, cc, acct_id, tlid, data) { var typeA = JSON.parse(mess.data).event; if (typeA == "delete") { var obj = JSON.parse(mess.data).payload; - $("[toot-id=" + JSON.parse(mess.data).payload + "]").hide(); - $("[toot-id=" + JSON.parse(mess.data).payload + "]").remove(); + if(delc=="true"){ + $("#timeline_"+tlid+" [toot-id=" + JSON.parse(mess.data).payload + "]").addClass("emphasized"); + $("#timeline_"+tlid+" [toot-id=" + JSON.parse(mess.data).payload + "]").addClass("by_delcatch"); + }else{ + $("[toot-id=" + JSON.parse(mess.data).payload + "]").hide(); + $("[toot-id=" + JSON.parse(mess.data).payload + "]").remove(); + } + } else if (typeA == "update") { var obj = JSON.parse(JSON.parse(mess.data).payload); console.log(obj); if($("#timeline_" + tlid +" [toot-id=" + obj.id + "]").length < 1){ - var templete = parse([obj], type, acct_id, tlid); + var templete = parse([obj], type, acct_id, tlid,"",mute); var pool = localStorage.getItem("pool_" + tlid); if (pool) { pool = templete + pool; @@ -181,6 +193,8 @@ function reload(type, cc, acct_id, tlid, data) { } todc(); + }else if(typeA=="filters_changed"){ + filterUpdate(acct_id); } websocket[wsid].onclose = function(mess) { console.log("Close Streaming API:" + type); @@ -241,7 +255,7 @@ function moreload(type, tlid) { todo(error); console.error(error); }).then(function(json) { - var templete = parse(json, '', acct_id, tlid); + var templete = parse(json, '', acct_id, tlid,"",mute); $("#timeline_" + tlid).append(templete); additional(acct_id, tlid); jQuery("time.timeago").timeago(); diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index 0b19cebc..a92ed82e 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -42,6 +42,8 @@ function parseColumn() { localStorage.setItem("acct_"+ key + "_at", acct.at); notf(key, 0); ckdb(key); + //フィルターデータ読もう + getFilter(key); }); } var acctlist=obj; @@ -113,13 +115,16 @@ function parseColumn() { ')" class="setting nex" title="このカラムの設定"'+icnsert+'>settings'+ '
perm_mediaOnメディアフィルター
linkOnリンク解析
TLヘッダーの色
[ここにトゥートはありません。]
F5/⌘+Rで再読込できます。
'; + key + '">Onリンク解析
deleteOn削除捕捉リセット
TLヘッダーの色
[ここにトゥートはありません。]
F5/⌘+Rで再読込できます。
'; $("#timeline-container").append(html); localStorage.removeItem("pool_" + key); if (acct.data) { @@ -127,9 +132,15 @@ function parseColumn() { } else { var data = ""; } - tl(acct.type, data, acct.domain, key); + if(localStorage.getItem("catch_" + tlid)){ + var delc="true"; + }else{ + var delc="false"; + } + tl(acct.type, data, acct.domain, key, delc); cardCheck(key); mediaCheck(key); + catchCheck(key) }); var width = localStorage.getItem("width"); if (width) { diff --git a/app/js/userdata/his-data.js b/app/js/userdata/his-data.js index ccca868a..485eae01 100644 --- a/app/js/userdata/his-data.js +++ b/app/js/userdata/his-data.js @@ -70,7 +70,7 @@ function pinutl(before,user, acct_id) { }).then(function(json) { var templete = parse(json, '', acct_id); if(!json[0]){ - templete="データはありません
"; + templete=""; } var height = $("#his-data-content").height() - 245; $(".tab-content").css('height', height); @@ -396,10 +396,14 @@ function showFrl(more, acct_id) { $("#his-follow-recom-contents").html("データはありません(Mastodon 2.4.3~が必要です)
"); console.error(error); }).then(function(json) { + console.log(json); if(!json[0]){ - templete="データはありません(Mastodon 2.4.3~)
"; + console.log("No data"); + templete="データはありません(非フォローだけど絡みがある時に表示されます。)
"; + }else{ + var templete = userparse(json,'',acct_id); } - var templete = userparse(json,'',acct_id); + if (more) { $("#his-follow-recom-contents").append(templete); } else { diff --git a/app/package.json b/app/package.json index e25bcf9e..38fabbc4 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "TheDesk", - "version": "15.8.0", + "version": "15.9.0", "description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです", "main": "main.js", "scripts": {