From f80b8d031edc81cb25e6bb13aa59e167c6913fbb Mon Sep 17 00:00:00 2001 From: cutls Date: Thu, 1 Apr 2021 12:47:13 +0900 Subject: [PATCH] #445 hidable some tools and show badge if it has a thread on detail of toot --- app/js/tl/datails.js | 13 +++++++++++++ app/view/make/index.sample.html | 12 +++++++----- app/view/make/language/en/setting.json | 2 ++ app/view/make/language/ja-KS/setting.json | 2 ++ app/view/make/language/ja/setting.json | 2 ++ app/view/make/setting.sample.js | 11 +++++++++++ 6 files changed, 37 insertions(+), 5 deletions(-) diff --git a/app/js/tl/datails.js b/app/js/tl/datails.js index de76a427..41144e82 100644 --- a/app/js/tl/datails.js +++ b/app/js/tl/datails.js @@ -5,6 +5,12 @@ function details(id, acct_id, tlid, mode) { } else { $('.dm-hide').show() } + const context = localStorage.getItem('moreContext') + if(context != 'yes') { + $('.contextTool').hide() + } else { + $('.contextTool').show() + } $('.toot-reset').html('' + lang.lang_details_nodata + '') var html = $('#timeline_' + tlid + ' [toot-id=' + id + ']').html() $('#toot-this').html(html) @@ -222,6 +228,10 @@ function getContext(id, acct_id) { var templete = parse(json.descendants, '', acct_id, '', '', mute) if (templete != '') { $('#toot-after .no-data').hide() + $('#toot-after-new').removeClass('hide') + } else { + $('#toot-after-new').addClass('hide') + $('#toot-after').html('' + lang.lang_details_nodata + '') } $('#toot-after').html(templete) $('#toot-after .hide').html(lang.lang_details_filtered) @@ -230,6 +240,9 @@ function getContext(id, acct_id) { var templete = parse(json.ancestors, '', acct_id, '', '', mute) if (templete != '') { $('#toot-reply .no-data').hide() + $('#toot-reply-new').removeClass('hide') + } else { + $('#toot-reply-new').addClass('hide') } $('#toot-reply').prepend(templete) $('#toot-reply .hide').html(lang.lang_details_filtered) diff --git a/app/view/make/index.sample.html b/app/view/make/index.sample.html index 3d613dd1..01bb346f 100644 --- a/app/view/make/index.sample.html +++ b/app/view/make/index.sample.html @@ -390,25 +390,26 @@