WIP: tag manager
This commit is contained in:
parent
72b060e7ae
commit
b3689fe297
|
@ -202,7 +202,7 @@ function parseColumn(target, dontclose) {
|
||||||
animecss,
|
animecss,
|
||||||
acct.data
|
acct.data
|
||||||
)
|
)
|
||||||
} else if (acct.type == 'bookmark') {
|
} else if (acct.type == 'bookmark') {
|
||||||
if (!acct.left_fold) {
|
if (!acct.left_fold) {
|
||||||
basekey = key
|
basekey = key
|
||||||
}
|
}
|
||||||
|
@ -224,20 +224,21 @@ function parseColumn(target, dontclose) {
|
||||||
animecss,
|
animecss,
|
||||||
acct.domain
|
acct.domain
|
||||||
)
|
)
|
||||||
}else {
|
} else {
|
||||||
var anime = localStorage.getItem('animation')
|
var anime = localStorage.getItem('animation')
|
||||||
if (anime == 'yes' || !anime) {
|
if (anime == 'yes' || !anime) {
|
||||||
var animecss = 'box-anime'
|
var animecss = 'box-anime'
|
||||||
} else {
|
} else {
|
||||||
var animecss = ''
|
var animecss = ''
|
||||||
}
|
}
|
||||||
var unread =
|
var unread = `<a id="unread_${key}" onclick="showUnread('${key}','${acct.type}','${acct.domain}')"
|
||||||
`<a id="unread_${key}" onclick="showUnread('${key}','${acct.type}','${acct.domain}')"
|
|
||||||
class="setting nex" title="${lang.lang_layout_unread}">
|
class="setting nex" title="${lang.lang_layout_unread}">
|
||||||
<i class="material-icons waves-effect nex">more</i>
|
<i class="material-icons waves-effect nex">more</i>
|
||||||
</a>`
|
</a>`
|
||||||
var notfDomain = acct.domain
|
var notfDomain = acct.domain
|
||||||
var notfKey = key
|
var notfKey = key
|
||||||
|
var if_tag = ''
|
||||||
|
var if_tag_btn = ''
|
||||||
if (acct.type == 'notf') {
|
if (acct.type == 'notf') {
|
||||||
var exclude =
|
var exclude =
|
||||||
lang.lang_excluded +
|
lang.lang_excluded +
|
||||||
|
@ -281,20 +282,31 @@ function parseColumn(target, dontclose) {
|
||||||
</button>`
|
</button>`
|
||||||
}
|
}
|
||||||
exclude = exclude + '<br>'
|
exclude = exclude + '<br>'
|
||||||
notfDomain = "dummy"
|
notfDomain = 'dummy'
|
||||||
notfKey = "dummy"
|
notfKey = 'dummy'
|
||||||
} else if (acct.type == 'home') {
|
} else if (acct.type == 'home') {
|
||||||
var exclude =
|
var exclude = `<a onclick="ebtToggle('${key}')" class="setting nex">
|
||||||
`<a onclick="ebtToggle('${key}')" class="setting nex">
|
|
||||||
<i class="fas fa-retweet waves-effect nex" title="${lang.lang_layout_excludingbt}" style="font-size:24px"></i>
|
<i class="fas fa-retweet waves-effect nex" title="${lang.lang_layout_excludingbt}" style="font-size:24px"></i>
|
||||||
<span id="sta-bt-${key}">Off</span>
|
<span id="sta-bt-${key}">Off</span>
|
||||||
</a>
|
</a>
|
||||||
${lang.lang_layout_excludingbt}
|
${lang.lang_layout_excludingbt}
|
||||||
<br>`
|
<br>`
|
||||||
|
} else if (acct.type == 'tag') {
|
||||||
|
if_tag = `<div class="column-hide notf-indv-box" id="tag-box_${key}" style="padding:5px;">
|
||||||
|
Base: ${acct.data}<br>
|
||||||
|
<div id="tagManager-${key}"></div>
|
||||||
|
<button onclick="addTag('${key}')" class="btn waves-effect" style="width: 100%">Add</button>
|
||||||
|
</div>`
|
||||||
|
if_tag_btn = `<a onclick="setToggleTag('${key}')" class="setting nex"
|
||||||
|
title="${lang.lang_layout_tagManager}" style="width:30px">
|
||||||
|
<i class="material-icons waves-effect nex">note_add</i>
|
||||||
|
</a>`
|
||||||
|
unread = ''
|
||||||
} else {
|
} else {
|
||||||
var exclude = ''
|
var exclude = ''
|
||||||
unread = ''
|
unread = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
var markers = localStorage.getItem('markers')
|
var markers = localStorage.getItem('markers')
|
||||||
if (markers == 'yes') {
|
if (markers == 'yes') {
|
||||||
markers = true
|
markers = true
|
||||||
|
@ -307,18 +319,15 @@ function parseColumn(target, dontclose) {
|
||||||
if (!acct.left_fold) {
|
if (!acct.left_fold) {
|
||||||
basekey = key
|
basekey = key
|
||||||
if (!numtarget) {
|
if (!numtarget) {
|
||||||
var basehtml =
|
var basehtml = `<div style="${css}" class="box ${animecss}" id="timeline_box_${basekey}_parentBox"></div>`
|
||||||
`<div style="${css}" class="box ${animecss}" id="timeline_box_${basekey}_parentBox"></div>`
|
|
||||||
$('#timeline-container').append(basehtml)
|
$('#timeline-container').append(basehtml)
|
||||||
}
|
}
|
||||||
var left_hold =
|
var left_hold = `<a onclick="leftFoldSet('${key}')" class="setting nex">
|
||||||
`<a onclick="leftFoldSet('${key}')" class="setting nex">
|
|
||||||
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftFold}">view_agenda</i>
|
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftFold}">view_agenda</i>
|
||||||
</a>
|
</a>
|
||||||
${lang.lang_layout_leftFold}<br>`
|
${lang.lang_layout_leftFold}<br>`
|
||||||
} else {
|
} else {
|
||||||
var left_hold =
|
var left_hold = `<a onclick="leftFoldRemove('${key}')" class="setting nex">
|
||||||
`<a onclick="leftFoldRemove('${key}')" class="setting nex">
|
|
||||||
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftUnfold}">view_column</i>
|
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftUnfold}">view_column</i>
|
||||||
</a>
|
</a>
|
||||||
${lang.lang_layout_leftUnfold}<br>`
|
${lang.lang_layout_leftUnfold}<br>`
|
||||||
|
@ -341,8 +350,7 @@ function parseColumn(target, dontclose) {
|
||||||
} else {
|
} else {
|
||||||
var addHeight = ''
|
var addHeight = ''
|
||||||
}
|
}
|
||||||
var html =
|
var html = `
|
||||||
`
|
|
||||||
<div class="boxIn" id="timeline_box_${key}_box" tlid="${key}" data-acct="${acct.domain}" style="${addHeight}">
|
<div class="boxIn" id="timeline_box_${key}_box" tlid="${key}" data-acct="${acct.domain}" style="${addHeight}">
|
||||||
<div class="notice-box z-depth-2" id="menu_${key}" style="${insert}">
|
<div class="notice-box z-depth-2" id="menu_${key}" style="${insert}">
|
||||||
<div class="area-notice">
|
<div class="area-notice">
|
||||||
|
@ -361,6 +369,7 @@ function parseColumn(target, dontclose) {
|
||||||
<i class="material-icons waves-effect nex notf-icon_${acct.domain}">notifications</i>
|
<i class="material-icons waves-effect nex notf-icon_${acct.domain}">notifications</i>
|
||||||
</a>
|
</a>
|
||||||
${unread}
|
${unread}
|
||||||
|
${if_tag_btn}
|
||||||
</div>
|
</div>
|
||||||
<div class="area-sta">
|
<div class="area-sta">
|
||||||
<span class="new badge teal notf-reply_${acct.domain} hide" data-badge-caption="Reply">0</span>
|
<span class="new badge teal notf-reply_${acct.domain} hide" data-badge-caption="Reply">0</span>
|
||||||
|
@ -412,7 +421,7 @@ function parseColumn(target, dontclose) {
|
||||||
${lang.lang_layout_headercolor}
|
${lang.lang_layout_headercolor}
|
||||||
<br>
|
<br>
|
||||||
<div id="picker_${key}" class="color-picker"></div>
|
<div id="picker_${key}" class="color-picker"></div>
|
||||||
</div>
|
</div>${if_tag}
|
||||||
<div class="tl-box" tlid="${key}">
|
<div class="tl-box" tlid="${key}">
|
||||||
<div id="timeline_${key}" class="tl ${acct.type}-timeline " tlid="${key}"
|
<div id="timeline_${key}" class="tl ${acct.type}-timeline " tlid="${key}"
|
||||||
data-type="${acct.type}" data-acct="${acct.domain}" data-const="${acct.type}_${acct.domain}">
|
data-type="${acct.type}" data-acct="${acct.domain}" data-const="${acct.type}_${acct.domain}">
|
||||||
|
@ -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) {
|
function colorpicker(key) {
|
||||||
temp =
|
temp = `<div onclick="coloradd('${key}','def','def')" class="pointer">Default</div>
|
||||||
`<div onclick="coloradd('${key}','def','def')" class="pointer">Default</div>
|
|
||||||
<div onclick="coloradd('${key}','f44336','white')" class="red white-text pointer">Red</div>
|
<div onclick="coloradd('${key}','f44336','white')" class="red white-text pointer">Red</div>
|
||||||
<div onclick="coloradd('${key}','e91e63','white')" class="pink white-text pointer">Pink</div>
|
<div onclick="coloradd('${key}','e91e63','white')" class="pink white-text pointer">Pink</div>
|
||||||
<div onclick="coloradd('${key}','9c27b0','white')" class="purple white-text pointer">Purple</div>
|
<div onclick="coloradd('${key}','9c27b0','white')" class="purple white-text pointer">Purple</div>
|
||||||
|
@ -717,8 +758,7 @@ function coloradd(key, bg, txt) {
|
||||||
}
|
}
|
||||||
//禁断のTwitter
|
//禁断のTwitter
|
||||||
function webviewParse(url, key, insert, icnsert, css) {
|
function webviewParse(url, key, insert, icnsert, css) {
|
||||||
var html =
|
var html = `<div class="box" id="timeline_box_${key}_box" tlid="${key}" style="${css}">
|
||||||
`<div class="box" id="timeline_box_${key}_box" tlid="${key}" style="${css}">
|
|
||||||
<div class="notice-box z-depth-2" id="menu_${key}" style="${insert}">
|
<div class="notice-box z-depth-2" id="menu_${key}" style="${insert}">
|
||||||
<div class="area-notice">
|
<div class="area-notice">
|
||||||
<i class="fab fa-twitter waves-effect" id="notice_icon_${key}" style="font-size:40px; padding-top:25%;"></i>
|
<i class="fab fa-twitter waves-effect" id="notice_icon_${key}" style="font-size:40px; padding-top:25%;"></i>
|
||||||
|
@ -753,25 +793,21 @@ function webviewParse(url, key, insert, icnsert, css) {
|
||||||
function unstreamingTL(type, key, basekey, insert, icnsert, left_fold, css, animecss, data) {
|
function unstreamingTL(type, key, basekey, insert, icnsert, left_fold, css, animecss, data) {
|
||||||
//type名が関数名
|
//type名が関数名
|
||||||
if (!left_fold) {
|
if (!left_fold) {
|
||||||
var basehtml =
|
var basehtml = `<div style="${css}" class="box ${animecss}" id="timeline_box_${basekey}_parentBox"></div>`
|
||||||
`<div style="${css}" class="box ${animecss}" id="timeline_box_${basekey}_parentBox"></div>`
|
|
||||||
$('#timeline-container').append(basehtml)
|
$('#timeline-container').append(basehtml)
|
||||||
var left_hold =
|
var left_hold = `<a onclick="leftFoldSet('${key}')" class="setting nex">
|
||||||
`<a onclick="leftFoldSet('${key}')" class="setting nex">
|
|
||||||
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftFold}">view_agenda</i>
|
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftFold}">view_agenda</i>
|
||||||
</a>
|
</a>
|
||||||
${lang.lang_layout_leftFold}
|
${lang.lang_layout_leftFold}
|
||||||
</span><br>`
|
</span><br>`
|
||||||
} else {
|
} else {
|
||||||
var left_hold =
|
var left_hold = `<a onclick="leftFoldRemove('${key}')" class="setting nex">
|
||||||
`<a onclick="leftFoldRemove('${key}')" class="setting nex">
|
|
||||||
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftUnfold}">view_column</i>
|
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftUnfold}">view_column</i>
|
||||||
</a>
|
</a>
|
||||||
${lang.lang_layout_leftUnfold}
|
${lang.lang_layout_leftUnfold}
|
||||||
</span><br>`
|
</span><br>`
|
||||||
}
|
}
|
||||||
var html =
|
var html = `<div class="boxIn" id="timeline_box_${key}_box" tlid="${key}">
|
||||||
`<div class="boxIn" id="timeline_box_${key}_box" tlid="${key}">
|
|
||||||
<div class="notice-box z-depth-2" id="menu_${key}" style="${insert} ">
|
<div class="notice-box z-depth-2" id="menu_${key}" style="${insert} ">
|
||||||
<div class="area-notice">
|
<div class="area-notice">
|
||||||
<i class="material-icons waves-effect" id="notice_icon_${key}" style="font-size:40px; padding-top:25%;"
|
<i class="material-icons waves-effect" id="notice_icon_${key}" style="font-size:40px; padding-top:25%;"
|
||||||
|
@ -811,9 +847,9 @@ function unstreamingTL(type, key, basekey, insert, icnsert, left_fold, css, anim
|
||||||
</div>
|
</div>
|
||||||
</div>`
|
</div>`
|
||||||
$('#timeline_box_' + basekey + '_parentBox').append(html)
|
$('#timeline_box_' + basekey + '_parentBox').append(html)
|
||||||
if(type == 'tootsearch'){
|
if (type == 'tootsearch') {
|
||||||
tootsearch(key, data)
|
tootsearch(key, data)
|
||||||
}else if(type == 'bookmark'){
|
} else if (type == 'bookmark') {
|
||||||
console.log(key, data)
|
console.log(key, data)
|
||||||
bookmark(key, data)
|
bookmark(key, data)
|
||||||
}
|
}
|
||||||
|
@ -824,7 +860,7 @@ function unstreamingTL(type, key, basekey, insert, icnsert, left_fold, css, anim
|
||||||
voiceCheck(key)
|
voiceCheck(key)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
function bookmark(key, data){
|
function bookmark(key, data) {
|
||||||
console.log(key, data)
|
console.log(key, data)
|
||||||
if (localStorage.getItem('voice_' + key)) {
|
if (localStorage.getItem('voice_' + key)) {
|
||||||
var voice = true
|
var voice = true
|
||||||
|
|
|
@ -137,6 +137,7 @@
|
||||||
"lang_layout_deleteColumn": "Delete this column",
|
"lang_layout_deleteColumn": "Delete this column",
|
||||||
"lang_layout_deleteColumnDesc": "Delete this column",
|
"lang_layout_deleteColumnDesc": "Delete this column",
|
||||||
"lang_layout_unread": "Unread",
|
"lang_layout_unread": "Unread",
|
||||||
|
"lang_layout_tagManager": "Tag timeline manager",
|
||||||
"lang_sort_gothis": "Go to this column",
|
"lang_sort_gothis": "Go to this column",
|
||||||
"lang_sort_remthis": "Delete this column",
|
"lang_sort_remthis": "Delete this column",
|
||||||
"lang_spotify_img": "Attach an album artwork",
|
"lang_spotify_img": "Attach an album artwork",
|
||||||
|
|
|
@ -137,6 +137,7 @@
|
||||||
"lang_layout_deleteColumn": "カラム削除",
|
"lang_layout_deleteColumn": "カラム削除",
|
||||||
"lang_layout_deleteColumnDesc": "カラムを削除しますか?",
|
"lang_layout_deleteColumnDesc": "カラムを削除しますか?",
|
||||||
"lang_layout_unread": "未読",
|
"lang_layout_unread": "未読",
|
||||||
|
"lang_layout_tagManager": "タグタイムラインの編集",
|
||||||
"lang_sort_gothis": "このカラムへ",
|
"lang_sort_gothis": "このカラムへ",
|
||||||
"lang_sort_remthis": "このカラムを削除",
|
"lang_sort_remthis": "このカラムを削除",
|
||||||
"lang_spotify_img": "アルバムアートワークを添付します。",
|
"lang_spotify_img": "アルバムアートワークを添付します。",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user