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