TheDesk 21.2.1 (Mayu)
This commit is contained in:
parent
16b68bb190
commit
e11af25ba6
|
@ -625,4 +625,12 @@ textarea {
|
|||
}
|
||||
.dropdown-content.header:hover {
|
||||
background-color: white;
|
||||
}
|
||||
button {
|
||||
font-family: inherit !important;
|
||||
}
|
||||
.via-dropdown {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow-x: hidden;
|
||||
}
|
|
@ -1145,9 +1145,8 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
|||
</div>
|
||||
</div>
|
||||
<ul class="dropdown-content contextMenu" id="dropdown_${tlid}_${uniqueid}">
|
||||
<li class="${viashow}">
|
||||
via ${escapeHTML(via)}<br>
|
||||
<a onclick="client('${$.strip_tags(via)}')" class="pointer">${lang.lang_parse_clientop}</a>
|
||||
<li class="${viashow} via-dropdown" onclick="client('${$.strip_tags(via)}')" title="${lang.lang_parse_clientop}">
|
||||
via ${escapeHTML(via)}</a>
|
||||
</li>
|
||||
<div>
|
||||
<li onclick="bkm('${uniqueid}','${acct_id}','${tlid}')"
|
||||
|
@ -1551,7 +1550,7 @@ var mastodonBaseWsStatus = {}
|
|||
function mastodonBaseStreaming(acct_id) {
|
||||
notfCommon(acct_id, 0, null, 'no')
|
||||
const domain = localStorage.getItem(`domain_${acct_id}`)
|
||||
if(mastodonBaseWsStatus[domain]) return
|
||||
if (mastodonBaseWsStatus[domain]) return
|
||||
mastodonBaseWsStatus[domain] = 'undetected'
|
||||
const at = localStorage.getItem(`acct_${acct_id}_at`)
|
||||
let wss = 'wss://' + domain
|
||||
|
@ -1611,7 +1610,16 @@ function mastodonBaseStreaming(acct_id) {
|
|||
notfCommon(acct_id, 0, null, 'only') //fallback
|
||||
console.error("Error closing " + domain)
|
||||
console.error(error)
|
||||
if (mastodonBaseWsStatus[domain] == 'available' && !pwa) location.reload()
|
||||
if (mastodonBaseWsStatus[domain] == 'available') {
|
||||
M.toast({
|
||||
html:
|
||||
`${lang.lang_parse_disconnected}<button class="btn-flat toast-action" onclick="location.reload()">${lang.lang_layout_reconnect}</button>`,
|
||||
completeCallback: function () {
|
||||
mastodonBaseWs[domain] = new WebSocket(start)
|
||||
},
|
||||
displayLength: 3000
|
||||
})
|
||||
}
|
||||
mastodonBaseWsStatus[domain] = 'cannotuse'
|
||||
setTimeout(function () {
|
||||
mastodonBaseWsStatus[domain] = 'cannotuse'
|
||||
|
@ -1622,7 +1630,16 @@ function mastodonBaseStreaming(acct_id) {
|
|||
mastodonBaseWs[domain].onclose = function () {
|
||||
notfCommon(acct_id, 0, null, 'only') //fallback
|
||||
console.warn("Closing " + domain)
|
||||
if (mastodonBaseWsStatus[domain] == 'available' && !pwa) location.reload()
|
||||
if (mastodonBaseWsStatus[domain] == 'available') {
|
||||
M.toast({
|
||||
html:
|
||||
`${lang.lang_parse_disconnected}<button class="btn-flat toast-action" onclick="location.reload()">${lang.lang_layout_reconnect}</button>`,
|
||||
completeCallback: function () {
|
||||
mastodonBaseWs[domain] = new WebSocket(start)
|
||||
},
|
||||
displayLength: 3000
|
||||
})
|
||||
}
|
||||
mastodonBaseWs[domain] = false
|
||||
mastodonBaseWsStatus[domain] = 'cannotuse'
|
||||
setTimeout(function () {
|
||||
|
|
|
@ -80,22 +80,6 @@ var postView = new Vue({
|
|||
})
|
||||
//設定ボタン押した。
|
||||
function settings() {
|
||||
var cd = $('[name=theme]:checked').val()
|
||||
var ct = $('[data-ct=' + cd + ']').html()
|
||||
if (cd == 'custom' && !$('#custom-sel-sel').val()) {
|
||||
var theme = localStorage.getItem('theme')
|
||||
if (!theme) {
|
||||
var theme = 'white'
|
||||
}
|
||||
$('#' + theme).prop('checked', true)
|
||||
} else {
|
||||
if (cd != localStorage.getItem('theme')) {
|
||||
M.toast({ html: lang.lang_setting_theme.replace('{{set}}', ct), displayLength: 3000 })
|
||||
}
|
||||
//テーマはこの場で設定
|
||||
themes(cd)
|
||||
localStorage.setItem('theme', cd)
|
||||
}
|
||||
var fontd = $('#font').val()
|
||||
if (fontd) {
|
||||
if (fontd != localStorage.getItem('font')) {
|
||||
|
|
|
@ -4,10 +4,17 @@ function themes(theme) {
|
|||
var theme = localStorage.getItem('customtheme-id')
|
||||
if (!theme) {
|
||||
localStorage.setItem('customtheme-id', 'black')
|
||||
theme = 'black'
|
||||
}
|
||||
}
|
||||
postMessage(['themeCSSRequest', theme + '.thedesktheme'], '*')
|
||||
var el = document.getElementsByTagName('html')[0]
|
||||
el.style.backgroundColor = 'var(--bg)'
|
||||
var font = localStorage.getItem('font')
|
||||
if(font) {
|
||||
el.style.fontFamily = font
|
||||
} else {
|
||||
el.style.fontFamily = ''
|
||||
}
|
||||
}
|
||||
themes()
|
||||
|
|
|
@ -226,6 +226,7 @@
|
|||
"lang_parse_html": "Show embed HTML",
|
||||
"lang_parse_notffilter": "Show this user's notifications",
|
||||
"lang_parse_hidden": "Unvisible quoted toot",
|
||||
"lang_parse_disconnected": "Streaming has been disconnected(retry after 3s)",
|
||||
"lang_misskeyparse_renote": "Repost",
|
||||
"lang_misskeyparse_renoteqt": "Renote",
|
||||
"lang_misskeyparse_reaction": "Reaction",
|
||||
|
|
|
@ -221,6 +221,7 @@
|
|||
"lang_parse_nsfw": "閲覧注意",
|
||||
"lang_parse_html": "埋め込みを表示",
|
||||
"lang_parse_notffilter": "このユーザーの通知だけ見る",
|
||||
"lang_parse_disconnected": "ストリーミングがなんかおかしいねん(3秒後にもっかいやってみる)",
|
||||
"lang_misskeyparse_renote": "再投稿",
|
||||
"lang_misskeyparse_renoteqt": "引用",
|
||||
"lang_misskeyparse_reaction": "リアクション",
|
||||
|
|
|
@ -227,6 +227,7 @@
|
|||
"lang_parse_html": "埋め込みを表示",
|
||||
"lang_parse_hidden": "ミュートされた引用トゥート",
|
||||
"lang_parse_notffilter": "このユーザーの通知のみを表示",
|
||||
"lang_parse_disconnected": "ストリーミングから切断されました(3秒後に再試行)",
|
||||
"lang_misskeyparse_renote": "再投稿",
|
||||
"lang_misskeyparse_renoteqt": "引用",
|
||||
"lang_misskeyparse_reaction": "リアクション",
|
||||
|
|
Loading…
Reference in New Issue
Block a user