From b3689fe2977ff43d2298769ff7e981a0e5b49e41 Mon Sep 17 00:00:00 2001 From: cutls Date: Sun, 24 Nov 2019 22:12:14 +0900 Subject: [PATCH] WIP: tag manager --- app/js/ui/layout.js | 104 +++++++++++++++++++--------- app/view/make/language/en/main.json | 1 + app/view/make/language/ja/main.json | 1 + 3 files changed, 72 insertions(+), 34 deletions(-) diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index 643c4f49..72eb741f 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -202,7 +202,7 @@ function parseColumn(target, dontclose) { animecss, acct.data ) - } else if (acct.type == 'bookmark') { + } else if (acct.type == 'bookmark') { if (!acct.left_fold) { basekey = key } @@ -224,20 +224,21 @@ function parseColumn(target, dontclose) { animecss, acct.domain ) - }else { + } else { var anime = localStorage.getItem('animation') if (anime == 'yes' || !anime) { var animecss = 'box-anime' } else { var animecss = '' } - var unread = - ` more ` - var notfDomain = acct.domain - var notfKey = key + var notfDomain = acct.domain + var notfKey = key + var if_tag = '' + var if_tag_btn = '' if (acct.type == 'notf') { var exclude = lang.lang_excluded + @@ -281,20 +282,31 @@ function parseColumn(target, dontclose) { ` } exclude = exclude + '
' - notfDomain = "dummy" - notfKey = "dummy" + notfDomain = 'dummy' + notfKey = 'dummy' } else if (acct.type == 'home') { - var exclude = - ` + var exclude = ` Off ${lang.lang_layout_excludingbt}
` + } else if (acct.type == 'tag') { + if_tag = `
+ Base: ${acct.data}
+
+ +
` + if_tag_btn = ` + note_add + ` + unread = '' } else { var exclude = '' unread = '' } + var markers = localStorage.getItem('markers') if (markers == 'yes') { markers = true @@ -307,18 +319,15 @@ function parseColumn(target, dontclose) { if (!acct.left_fold) { basekey = key if (!numtarget) { - var basehtml = - `
` + var basehtml = `
` $('#timeline-container').append(basehtml) } - var left_hold = - ` + var left_hold = ` view_agenda ${lang.lang_layout_leftFold}
` } else { - var left_hold = - ` + var left_hold = ` view_column ${lang.lang_layout_leftUnfold}
` @@ -341,8 +350,7 @@ function parseColumn(target, dontclose) { } else { var addHeight = '' } - var html = - ` + var html = `
${if_tag}
@@ -663,9 +672,41 @@ function setToggle(tlid) { ) } } +//タグトグル +//設定トグル +function setToggleTag(tlid) { + if ($('#tag-box_' + tlid).hasClass('column-hide')) { + $('#tag-box_' + tlid).css('display', 'block') + $('#tag-box_' + tlid).animate( + { + height: '200px' + }, + { + duration: 300, + complete: function() { + $('#tag-box_' + tlid).css('overflow-y', 'scroll') + $('#tag-box_' + tlid).removeClass('column-hide') + } + } + ) + } else { + $('#tag-box_' + tlid).css('overflow-y', 'hidden') + $('#tag-box_' + tlid).animate( + { + height: '0' + }, + { + duration: 300, + complete: function() { + $('#tag-box_' + tlid).addClass('column-hide') + $('#tag-box_' + tlid).css('display', 'none') + } + } + ) + } +} function colorpicker(key) { - temp = - `
Default
+ temp = `
Default
Red
Pink
Purple
@@ -717,8 +758,7 @@ function coloradd(key, bg, txt) { } //禁断のTwitter function webviewParse(url, key, insert, icnsert, css) { - var html = - `
+ var html = `