For Pleroma move type notif

This commit is contained in:
cutls 2019-12-12 00:06:12 +09:00
parent 7366d9ce98
commit 320576f288
5 changed files with 21 additions and 13 deletions

View File

@ -180,7 +180,8 @@ function notfCommon(acct_id, tlid, sys) {
var n = new Notification('TheDesk:' + domain, options) var n = new Notification('TheDesk:' + domain, options)
} }
var mute = getFilterTypeByAcct(acct_id, 'notif') var mute = getFilterTypeByAcct(acct_id, 'notif')
if (obj.type != 'follow') { //Pleromaにはmoveというtypeがあるらしい。何が互換APIじゃ
if (obj.type != 'follow' && obj.type != 'move') {
if (misskey) { if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute) templete = templete + misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute)
} else { } else {
@ -190,7 +191,7 @@ function notfCommon(acct_id, tlid, sys) {
if (misskey) { if (misskey) {
templete = templete + misskeyUserparse([obj], 'notf', acct_id, 'notf', -1, mute) templete = templete + misskeyUserparse([obj], 'notf', acct_id, 'notf', -1, mute)
} else { } else {
templete = templete + userparse([obj.account], 'notf', acct_id, 'notf', -1) templete = templete + userparse([obj.account], type, acct_id, 'notf', -1)
} }
} }
}) })

View File

@ -1085,28 +1085,28 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
<a onclick="client('${$.strip_tags(via)}')" class="pointer">${lang.lang_parse_clientop}</a> <a onclick="client('${$.strip_tags(via)}')" class="pointer">${lang.lang_parse_clientop}</a>
</div> </div>
<div> <div>
<button onclick="bkm('${toot.id}','${acct_id}','${tlid}')" <button onclick="bkm('${uniqueid}','${acct_id}','${tlid}')"
class="waves-effect waves-dark btn-flat actct bkm-btn" style="padding:0"> class="waves-effect waves-dark btn-flat actct bkm-btn" style="padding:0">
<i class="fas text-darken-3 fa-bookmark bkm_${toot.id} ${if_bkm}"></i> <i class="fas text-darken-3 fa-bookmark bkm_${toot.id} ${if_bkm}"></i>
<span class="bkmStr_${toot.id}">${bkmStr}</span> <span class="bkmStr_${uniqueid}">${bkmStr}</span>
</button> </button>
</div> </div>
<div class="${if_mine}"> <div class="${if_mine}">
<button onclick="del('${toot.id}','${acct_id}')" class="waves-effect waves-dark btn-flat actct" <button onclick="del('${uniqueid}','${acct_id}')" class="waves-effect waves-dark btn-flat actct"
style="padding:0"> style="padding:0">
<i class="fas fa-trash"></i>${lang.lang_parse_del} <i class="fas fa-trash"></i>${lang.lang_parse_del}
</button> </button>
</div> </div>
<div class="${if_mine}"> <div class="${if_mine}">
<button onclick="pin('${ <button onclick="pin('${
toot.id uniqueid
}','${acct_id}')" class="waves-effect waves-dark btn-flat actct" style="padding:0"> }','${acct_id}')" class="waves-effect waves-dark btn-flat actct" style="padding:0">
<i class="fas fa-map-pin pin_${toot.id} ${if_pin}"></i> <i class="fas fa-map-pin pin_${uniqueid} ${if_pin}"></i>
<span class="pinStr_${toot.id}">${pinStr}</span> <span class="pinStr_${uniqueid}">${pinStr}</span>
</button> </button>
</div> </div>
<div class="${if_mine}"> <div class="${if_mine}">
<button onclick="redraft('${toot.id}','${acct_id}')" class="waves-effect waves-dark btn-flat actct" <button onclick="redraft('${uniqueid}','${acct_id}')" class="waves-effect waves-dark btn-flat actct"
style="padding:0"> style="padding:0">
<i class="material-icons">redo</i>${lang.lang_parse_redraft} <i class="material-icons">redo</i>${lang.lang_parse_redraft}
</button> </button>
@ -1167,10 +1167,14 @@ function userparse(obj, auth, acct_id, tlid, popup) {
} else { } else {
var authhtml = '' var authhtml = ''
} }
var ftxt = lang.lang_parse_followed if (auth == 'follow') {
if (!locale && localStorage.getItem('followlocale_' + acct_id)) { var ftxt = lang.lang_parse_followed
ftxt = localStorage.getItem('followlocale_' + acct_id) if (!locale && localStorage.getItem('followlocale_' + acct_id)) {
} ftxt = localStorage.getItem('followlocale_' + acct_id)
}
} else if (auth == 'moved') {
var ftxt = lang.lang_parse_moved
}
if (popup > 0 || popup == -1 || notf) { if (popup > 0 || popup == -1 || notf) {
var notftext = ftxt + '<br>' var notftext = ftxt + '<br>'
} else { } else {

View File

@ -193,6 +193,7 @@
"lang_parse_detail": "Details", "lang_parse_detail": "Details",
"lang_parse_redraft": "Delete & re-draft", "lang_parse_redraft": "Delete & re-draft",
"lang_parse_followed": "Followed you", "lang_parse_followed": "Followed you",
"lang_parse_moved": "Moved to...",
"lang_parse_clientop": "Operation of this client", "lang_parse_clientop": "Operation of this client",
"lang_parse_clienttxt": " will be", "lang_parse_clienttxt": " will be",
"lang_parse_clientno": "done nothing", "lang_parse_clientno": "done nothing",

View File

@ -193,6 +193,7 @@
"lang_parse_det": "詳細(メインアカウント経由)", "lang_parse_det": "詳細(メインアカウント経由)",
"lang_parse_redraft": "このトゥートを削除して再編集", "lang_parse_redraft": "このトゥートを削除して再編集",
"lang_parse_followed": "フォローしてもろた。", "lang_parse_followed": "フォローしてもろた。",
"lang_parse_moved": "他のサーバー行ったで",
"lang_parse_clientop": "クライアント操作", "lang_parse_clientop": "クライアント操作",
"lang_parse_clienttxt": " どうする?", "lang_parse_clienttxt": " どうする?",
"lang_parse_clientno": "何もせえへん", "lang_parse_clientno": "何もせえへん",

View File

@ -193,6 +193,7 @@
"lang_parse_det": "詳細(メインアカウント経由)", "lang_parse_det": "詳細(メインアカウント経由)",
"lang_parse_redraft": "削除して再編集", "lang_parse_redraft": "削除して再編集",
"lang_parse_followed": "フォローされました。", "lang_parse_followed": "フォローされました。",
"lang_parse_moved": "引っ越ししました。",
"lang_parse_clientop": "クライアント操作", "lang_parse_clientop": "クライアント操作",
"lang_parse_clienttxt": " に対する処理を選択してください。", "lang_parse_clienttxt": " に対する処理を選択してください。",
"lang_parse_clientno": "何もしない", "lang_parse_clientno": "何もしない",