Unread misc
This commit is contained in:
parent
c86a99df06
commit
e04b64a326
|
@ -41,6 +41,7 @@ The default sounds of notifications is provided [Creative Commons BY](https://cr
|
||||||
|
|
||||||
* 日本語(Japanese)
|
* 日本語(Japanese)
|
||||||
* English
|
* English
|
||||||
|
* de, cs, bg(from Crowdin)
|
||||||
|
|
||||||
### Translation
|
### Translation
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ Download:[TheDesk](https://thedesk.top) [![check](https://status.cutls.com/badge
|
||||||
|
|
||||||
* 日本語
|
* 日本語
|
||||||
* English(英語)
|
* English(英語)
|
||||||
|
* ドイツ語, チェコ語, ブルガリア語(from Crowdin)
|
||||||
|
|
||||||
### 翻訳
|
### 翻訳
|
||||||
|
|
||||||
|
@ -72,7 +73,7 @@ Linuxビルダー
|
||||||
|
|
||||||
* [ぽぷんじゃ](https://popon.pptdn.jp/@popn_ja)
|
* [ぽぷんじゃ](https://popon.pptdn.jp/@popn_ja)
|
||||||
|
|
||||||
iTunes NowPlayingにアルバムアートワークを付けてくれた人
|
コーダー
|
||||||
|
|
||||||
* [kPherox](https://pl.kpherox.dev/kPherox)
|
* [kPherox](https://pl.kpherox.dev/kPherox)
|
||||||
|
|
||||||
|
|
|
@ -191,6 +191,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||||
var times = [];
|
var times = [];
|
||||||
Object.keys(obj).forEach(function (key) {
|
Object.keys(obj).forEach(function (key) {
|
||||||
var toot = obj[key];
|
var toot = obj[key];
|
||||||
|
|
||||||
if (type == "dm") {
|
if (type == "dm") {
|
||||||
var dmid = toot.id;
|
var dmid = toot.id;
|
||||||
toot = toot.last_status;
|
toot = toot.last_status;
|
||||||
|
@ -425,6 +426,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (toot.content) {
|
||||||
var id = toot.id;
|
var id = toot.id;
|
||||||
if (mix == "home") {
|
if (mix == "home") {
|
||||||
var home = ""
|
var home = ""
|
||||||
|
@ -473,8 +475,13 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||||
var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id +
|
var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id +
|
||||||
'\')" class="nex parsed cw_btn">' + lang.lang_parse_cwshow + '</a><br>';
|
'\')" class="nex parsed cw_btn">' + lang.lang_parse_cwshow + '</a><br>';
|
||||||
} else {
|
} else {
|
||||||
|
if (toot.content) {
|
||||||
var ct1 = toot.content.split('</p>').length + toot.content.split('<br />').length - 2;
|
var ct1 = toot.content.split('</p>').length + toot.content.split('<br />').length - 2;
|
||||||
var ct2 = toot.content.split('</p>').length + toot.content.split('<br>').length - 2;
|
var ct2 = toot.content.split('</p>').length + toot.content.split('<br>').length - 2;
|
||||||
|
} else {
|
||||||
|
var ct1 = 100;
|
||||||
|
var ct2 = 100;
|
||||||
|
}
|
||||||
if (ct1 > ct2) { var ct = ct1; } else { var ct = ct2; }
|
if (ct1 > ct2) { var ct = ct1; } else { var ct = ct2; }
|
||||||
if ((sent < ct && $.mb_strlen($.strip_tags(toot.content)) > 5) || ($.strip_tags(toot.content).length > ltr && $.mb_strlen($.strip_tags(toot.content)) > 5)) {
|
if ((sent < ct && $.mb_strlen($.strip_tags(toot.content)) > 5) || ($.strip_tags(toot.content).length > ltr && $.mb_strlen($.strip_tags(toot.content)) > 5)) {
|
||||||
var content = '<span class="gray">' + lang.lang_parse_fulltext + '</span><br>' + toot.content
|
var content = '<span class="gray">' + lang.lang_parse_fulltext + '</span><br>' + toot.content
|
||||||
|
@ -843,11 +850,11 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||||
//Quote
|
//Quote
|
||||||
if (toot.quote) {
|
if (toot.quote) {
|
||||||
var quoteUser = toot.quote.account.display_name
|
var quoteUser = toot.quote.account.display_name
|
||||||
if(!quoteUser){
|
if (!quoteUser) {
|
||||||
quoteUser = toot.quote.account.acct
|
quoteUser = toot.quote.account.acct
|
||||||
}
|
}
|
||||||
poll = poll + '<div class="quote-renote"><div class="renote-icon"><a onclick="udg(\'' + toot.quote.account.id +
|
poll = poll + '<div class="quote-renote"><div class="renote-icon"><a onclick="udg(\'' + toot.quote.account.id +
|
||||||
'\',' + acct_id + ');" user="' + toot.quote.account.acct + '" class="udg"><img draggable="false" src="' + toot.quote.account.avatar + '"></a>'+
|
'\',' + acct_id + ');" user="' + toot.quote.account.acct + '" class="udg"><img draggable="false" src="' + toot.quote.account.avatar + '"></a>' +
|
||||||
'</div><div class="renote-user">' + escapeHTML(quoteUser) + '</div><div class="renote-text">' + toot.quote.content + '</div><div class="renote-details"><a onclick="details(\'' + toot.quote.id + '\',' + acct_id +
|
'</div><div class="renote-user">' + escapeHTML(quoteUser) + '</div><div class="renote-text">' + toot.quote.content + '</div><div class="renote-details"><a onclick="details(\'' + toot.quote.id + '\',' + acct_id +
|
||||||
',\'' + tlid + '\',\'normal\')" class="waves-effect waves-dark btn-flat details" style="padding:0"><i class="text-darken-3 material-icons">more_vert</i></a></div></div>'
|
',\'' + tlid + '\',\'normal\')" class="waves-effect waves-dark btn-flat details" style="padding:0"><i class="text-darken-3 material-icons">more_vert</i></a></div></div>'
|
||||||
}
|
}
|
||||||
|
@ -917,6 +924,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||||
',\'' + tlid + '\',\'normal\')" class="waves-effect waves-dark btn-flat details ' + dmHide + '" style="padding:0"><i class="text-darken-3 material-icons">more_vert</i></a></div>' +
|
',\'' + tlid + '\',\'normal\')" class="waves-effect waves-dark btn-flat details ' + dmHide + '" style="padding:0"><i class="text-darken-3 material-icons">more_vert</i></a></div>' +
|
||||||
'</div></div>' +
|
'</div></div>' +
|
||||||
'</div></div>';
|
'</div></div>';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (mix == "mix") {
|
if (mix == "mix") {
|
||||||
return [templete, local, times]
|
return [templete, local, times]
|
||||||
|
|
|
@ -919,7 +919,6 @@ function getMarker(tlid, type, acct_id) {
|
||||||
}
|
}
|
||||||
function showUnread(tlid, type, acct_id) {
|
function showUnread(tlid, type, acct_id) {
|
||||||
if ($("#unread_" + tlid + " .material-icons").hasClass("teal-text")) {
|
if ($("#unread_" + tlid + " .material-icons").hasClass("teal-text")) {
|
||||||
$("#unread_" + tlid + " .material-icons").removeClass("teal-text")
|
|
||||||
goTop(tlid)
|
goTop(tlid)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -945,7 +944,7 @@ function showUnread(tlid, type, acct_id) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function (json) {
|
}).then(function (json) {
|
||||||
if (!json) {
|
if (!json || !json.length) {
|
||||||
columnReload(tlid, type)
|
columnReload(tlid, type)
|
||||||
}
|
}
|
||||||
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
|
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
|
||||||
|
@ -953,11 +952,13 @@ function showUnread(tlid, type, acct_id) {
|
||||||
} else {
|
} else {
|
||||||
var mute = [];
|
var mute = [];
|
||||||
}
|
}
|
||||||
var templete = parse(json, '', acct_id, tlid, "", mute, type);
|
var templete = parse(json, type, acct_id, tlid, "", mute, type);
|
||||||
var len = json.length - 1
|
var len = json.length - 1
|
||||||
$("#timeline_" + tlid).html(templete);
|
$("#timeline_" + tlid).html(templete);
|
||||||
|
if ($("#timeline_" + tlid + " .cvo:eq(" + len + ")").length) {
|
||||||
var to = $("#timeline_" + tlid + " .cvo:eq(" + len + ")").offset().top
|
var to = $("#timeline_" + tlid + " .cvo:eq(" + len + ")").offset().top
|
||||||
$("#timeline_box_" + tlid + "_box .tl-box").scrollTop(to)
|
$("#timeline_box_" + tlid + "_box .tl-box").scrollTop(to)
|
||||||
|
}
|
||||||
additional(acct_id, tlid);
|
additional(acct_id, tlid);
|
||||||
jQuery("time.timeago").timeago();
|
jQuery("time.timeago").timeago();
|
||||||
todc();
|
todc();
|
||||||
|
@ -1005,8 +1006,10 @@ function ueload(tlid) {
|
||||||
var templete = parse(json, '', acct_id, tlid, "", mute, type);
|
var templete = parse(json, '', acct_id, tlid, "", mute, type);
|
||||||
var len = json.length - 1
|
var len = json.length - 1
|
||||||
$("#timeline_" + tlid).prepend(templete);
|
$("#timeline_" + tlid).prepend(templete);
|
||||||
|
if ($("#timeline_" + tlid + " .cvo:eq(" + len + ")").length) {
|
||||||
var to = $("#timeline_" + tlid + " .cvo:eq(" + len + ")").offset().top
|
var to = $("#timeline_" + tlid + " .cvo:eq(" + len + ")").offset().top
|
||||||
$("#timeline_box_" + tlid + "_box .tl-box").scrollTop(to)
|
$("#timeline_box_" + tlid + "_box .tl-box").scrollTop(to)
|
||||||
|
}
|
||||||
additional(acct_id, tlid);
|
additional(acct_id, tlid);
|
||||||
jQuery("time.timeago").timeago();
|
jQuery("time.timeago").timeago();
|
||||||
todc();
|
todc();
|
||||||
|
@ -1027,15 +1030,15 @@ function asRead() {
|
||||||
for (var i = 0; i < obj.length; i++) {
|
for (var i = 0; i < obj.length; i++) {
|
||||||
var acct_id = obj[i].domain
|
var acct_id = obj[i].domain
|
||||||
var type = obj[i].type
|
var type = obj[i].type
|
||||||
if(type == "home" || type == "notf"){
|
if (type == "home" || type == "notf") {
|
||||||
if(type == "home"){
|
if (type == "home") {
|
||||||
var id = $("#timeline_" + i + " .cvo:eq(0)").attr("unique-id")
|
var id = $("#timeline_" + i + " .cvo:eq(0)").attr("unique-id")
|
||||||
var poster = {
|
var poster = {
|
||||||
home: {
|
home: {
|
||||||
last_read_id: id
|
last_read_id: id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
var id = $("#timeline_" + i + " .cvo:eq(0)").attr("data-notf")
|
var id = $("#timeline_" + i + " .cvo:eq(0)").attr("data-notf")
|
||||||
var poster = {
|
var poster = {
|
||||||
notifications: {
|
notifications: {
|
||||||
|
|
|
@ -212,6 +212,15 @@ function parseColumn(target, dontclose) {
|
||||||
var exclude = "";
|
var exclude = "";
|
||||||
unread = ""
|
unread = ""
|
||||||
}
|
}
|
||||||
|
var markers = localStorage.getItem("markers");
|
||||||
|
if (markers == "no") {
|
||||||
|
markers = false;
|
||||||
|
} else {
|
||||||
|
markers = true
|
||||||
|
}
|
||||||
|
if (!markers) {
|
||||||
|
unread = ""
|
||||||
|
}
|
||||||
if (!acct.left_fold) {
|
if (!acct.left_fold) {
|
||||||
basekey = key;
|
basekey = key;
|
||||||
if (!numtarget) {
|
if (!numtarget) {
|
||||||
|
|
|
@ -41,6 +41,11 @@ function scrollck() {
|
||||||
function goTop(id) {
|
function goTop(id) {
|
||||||
if ($("#unread_" + id + " .material-icons").hasClass("teal-text")) {
|
if ($("#unread_" + id + " .material-icons").hasClass("teal-text")) {
|
||||||
$("#unread_" + id + " .material-icons").removeClass("teal-text")
|
$("#unread_" + id + " .material-icons").removeClass("teal-text")
|
||||||
|
var multi = localStorage.getItem("column")
|
||||||
|
var obj = JSON.parse(multi)
|
||||||
|
var acct_id = obj[id * 1].domain
|
||||||
|
var type = obj[id * 1].type
|
||||||
|
console.log(id, type)
|
||||||
columnReload(id, type)
|
columnReload(id, type)
|
||||||
}
|
}
|
||||||
if ($("#timeline_box_" + id + "_box .tl-box").scrollTop() > 500) {
|
if ($("#timeline_box_" + id + "_box .tl-box").scrollTop() > 500) {
|
||||||
|
|
|
@ -87,6 +87,8 @@
|
||||||
"ticker": "Enable #InstanceTicker",
|
"ticker": "Enable #InstanceTicker",
|
||||||
"tickerwarn": "Show colorful stickers about the server. <a href=\"https://cdn.weep.me/mastodon/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
|
"tickerwarn": "Show colorful stickers about the server. <a href=\"https://cdn.weep.me/mastodon/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
|
||||||
"animation": "Анимация на времевата линия",
|
"animation": "Анимация на времевата линия",
|
||||||
|
"markers": "Markers(mark as read) on HTL and notifications",
|
||||||
|
"markerswarn": "Mastodon 3.0~. Shared on WebUI and third-party supported clients.",
|
||||||
"replySound": "Звук (Отговор)",
|
"replySound": "Звук (Отговор)",
|
||||||
"favSound": "Звук(Фаворит)",
|
"favSound": "Звук(Фаворит)",
|
||||||
"btSound": "Звук(Подсилване)",
|
"btSound": "Звук(Подсилване)",
|
||||||
|
|
|
@ -87,6 +87,8 @@
|
||||||
"ticker": "Enable #InstanceTicker",
|
"ticker": "Enable #InstanceTicker",
|
||||||
"tickerwarn": "Show colorful stickers about the server. <a href=\"https://cdn.weep.me/mastodon/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
|
"tickerwarn": "Show colorful stickers about the server. <a href=\"https://cdn.weep.me/mastodon/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
|
||||||
"animation": "Animation of timelines",
|
"animation": "Animation of timelines",
|
||||||
|
"markers": "Markers(mark as read) on HTL and notifications",
|
||||||
|
"markerswarn": "Mastodon 3.0~. Shared on WebUI and third-party supported clients.",
|
||||||
"replySound": "Sound(Reply)",
|
"replySound": "Sound(Reply)",
|
||||||
"favSound": "Sound(Fav)",
|
"favSound": "Sound(Fav)",
|
||||||
"btSound": "Sound(Boost)",
|
"btSound": "Sound(Boost)",
|
||||||
|
|
|
@ -87,6 +87,8 @@
|
||||||
"ticker": "Aktiviere #InstanceTicker",
|
"ticker": "Aktiviere #InstanceTicker",
|
||||||
"tickerwarn": "Zeigt bunte Sticker über den Server. <a href=\"https://wee.jp/\">Über #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
|
"tickerwarn": "Zeigt bunte Sticker über den Server. <a href=\"https://wee.jp/\">Über #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
|
||||||
"animation": "Animation der Verläufe",
|
"animation": "Animation der Verläufe",
|
||||||
|
"markers": "Markers(mark as read) on HTL and notifications",
|
||||||
|
"markerswarn": "Mastodon 3.0~. Shared on WebUI and third-party supported clients.",
|
||||||
"replySound": "Ton bei Antwort",
|
"replySound": "Ton bei Antwort",
|
||||||
"favSound": "Ton bei Favorit",
|
"favSound": "Ton bei Favorit",
|
||||||
"btSound": "Ton bei Verstärkung",
|
"btSound": "Ton bei Verstärkung",
|
||||||
|
|
|
@ -87,6 +87,8 @@
|
||||||
"ticker": "Enable #InstanceTicker",
|
"ticker": "Enable #InstanceTicker",
|
||||||
"tickerwarn": "Show colorful stickers about the server. <a href=\"https://wee.jp/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
|
"tickerwarn": "Show colorful stickers about the server. <a href=\"https://wee.jp/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
|
||||||
"animation": "Animation of timelines",
|
"animation": "Animation of timelines",
|
||||||
|
"markers": "Markers(mark as read) on HTL and notifications",
|
||||||
|
"markerswarn": "Mastodon 3.0~. Shared on WebUI and third-party supported clients.",
|
||||||
"replySound": "Sound(Reply)",
|
"replySound": "Sound(Reply)",
|
||||||
"favSound": "Sound(Fav)",
|
"favSound": "Sound(Fav)",
|
||||||
"btSound": "Sound(Boost)",
|
"btSound": "Sound(Boost)",
|
||||||
|
|
|
@ -87,6 +87,8 @@
|
||||||
"ticker": "#InstanceTickerを使う",
|
"ticker": "#InstanceTickerを使う",
|
||||||
"tickerwarn": "トゥートした人の所属サーバーをわかりやすく彩ります(自サーバー以外のトゥート向け)。<a href=\"https://https://wee.jp/\">#InstanceTickerについて</a> Copyright 2018 weepjp, kyori19.",
|
"tickerwarn": "トゥートした人の所属サーバーをわかりやすく彩ります(自サーバー以外のトゥート向け)。<a href=\"https://https://wee.jp/\">#InstanceTickerについて</a> Copyright 2018 weepjp, kyori19.",
|
||||||
"animation": "タイムラインのアニメーション",
|
"animation": "タイムラインのアニメーション",
|
||||||
|
"markers": "ホームと通知の未読管理",
|
||||||
|
"markerswarn": "Mastodon 3.0相当以上。WebUIと対応クライアントで共有されます。",
|
||||||
"replySound": "リプライの通知音",
|
"replySound": "リプライの通知音",
|
||||||
"favSound": "お気に入り登録の通知音",
|
"favSound": "お気に入り登録の通知音",
|
||||||
"btSound": "ブーストの通知音",
|
"btSound": "ブーストの通知音",
|
||||||
|
|
|
@ -307,6 +307,16 @@ var tlConstruction = [
|
||||||
desc: "",
|
desc: "",
|
||||||
checkbox: yesno
|
checkbox: yesno
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
id: "markers",
|
||||||
|
storage: "markers",
|
||||||
|
checkbox: true,
|
||||||
|
setValue: "yes",
|
||||||
|
text: {
|
||||||
|
head: "@@markers@@",
|
||||||
|
desc: "@@markerswarn@@",
|
||||||
|
checkbox: yesno
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
id: "replySound",
|
id: "replySound",
|
||||||
storage: "replySound",
|
storage: "replySound",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user