Improve UX
This commit is contained in:
parent
c3b19bbf30
commit
ccd496722a
1 changed files with 72 additions and 60 deletions
|
@ -70,65 +70,67 @@ block content
|
||||||
| スコア通知方法に「Misskey に通知」を選んでいる場合、Groundpolis v3 および Misskey v12 の最新版以外では動作しません。めいすきーや古いバージョンをお使いの方は、「自動的にノートを投稿」をお使いください。
|
| スコア通知方法に「Misskey に通知」を選んでいる場合、Groundpolis v3 および Misskey v12 の最新版以外では動作しません。めいすきーや古いバージョンをお使いの方は、「自動的にノートを投稿」をお使いください。
|
||||||
form(method="post", action="/update-settings")
|
form(method="post", action="/update-settings")
|
||||||
p: label スコア通知方法:
|
p: label スコア通知方法:
|
||||||
select(name="alertMode", tabindex=1)
|
select#alertModeSelector(name="alertMode", tabindex=1)
|
||||||
each set in alertModes
|
each set in alertModes
|
||||||
option(value=set[0], selected=(user.alertMode === set[0]))= set[1]
|
option(value=set[0], selected=(user.alertMode === set[0]))= set[1]
|
||||||
p: label 公開範囲:
|
#hideWhenAlertModeNotNote
|
||||||
select(name="visibility", tabindex=2)
|
p: label 公開範囲:
|
||||||
each set in visibilities
|
select(name="visibility", tabindex=2)
|
||||||
option(value=set[0], selected=(user.visibility === set[0]))= set[1]
|
each set in visibilities
|
||||||
p
|
option(value=set[0], selected=(user.visibility === set[0]))= set[1]
|
||||||
| フラグ <br />
|
p
|
||||||
label
|
| フラグ <br />
|
||||||
input(type="radio", name="flag", value="none", checked=!user.localOnly && !user.remoteFollowersOnly, tabindex=3)
|
|
||||||
| なし(標準)<br />
|
|
||||||
label
|
|
||||||
input(type="radio", name="flag", value="localOnly", checked=user.localOnly, tabindex=4)
|
|
||||||
| ローカルのみ<br />
|
|
||||||
if isGroundpolis
|
|
||||||
label
|
label
|
||||||
input(type="radio", name="flag", value="remoteFollowersOnly", checked=user.remoteFollowersOnly, tabindex=5)
|
input(type="radio", name="flag", value="none", checked=!user.localOnly && !user.remoteFollowersOnly, tabindex=3)
|
||||||
| リモートフォロワーとローカル<br />
|
| なし(標準)<br />
|
||||||
div
|
label
|
||||||
label 投稿テンプレート
|
input(type="radio", name="flag", value="localOnly", checked=user.localOnly, tabindex=4)
|
||||||
div: textarea(name="template", disabled, tabindex=6)
|
| ローカルのみ<br />
|
||||||
details(tabindex=7)
|
if isGroundpolis
|
||||||
summary ヘルプ
|
label
|
||||||
p
|
input(type="radio", name="flag", value="remoteFollowersOnly", checked=user.remoteFollowersOnly, tabindex=5)
|
||||||
code {notesCount}
|
| リモートフォロワーとローカル<br />
|
||||||
| などのテキストを挿入することで、投稿時に自動的に値が埋め込まれます。これを変数といいます。変数の表を次に示します。
|
#hideWhenAlertModeNothing
|
||||||
table
|
div
|
||||||
thead: tr
|
label 投稿テンプレート
|
||||||
th 変数
|
div: textarea(name="template", disabled, tabindex=6)
|
||||||
th 説明
|
details(tabindex=7)
|
||||||
tbody
|
summary ヘルプ
|
||||||
tr
|
p
|
||||||
td {notesCount}
|
code {notesCount}
|
||||||
td ノート数
|
| などのテキストを挿入することで、投稿時に自動的に値が埋め込まれます。これを変数といいます。変数の表を次に示します。
|
||||||
tr
|
table
|
||||||
td {followingCount}
|
thead: tr
|
||||||
td フォロー数
|
th 変数
|
||||||
tr
|
th 説明
|
||||||
td {followersCount}
|
tbody
|
||||||
td フォロワー数
|
tr
|
||||||
tr
|
td {notesCount}
|
||||||
td {notesDelta}
|
td ノート数
|
||||||
td 昨日とのノート数の差
|
tr
|
||||||
tr
|
td {followingCount}
|
||||||
td {followingDelta}
|
td フォロー数
|
||||||
td 昨日とのフォロー数の差
|
tr
|
||||||
tr
|
td {followersCount}
|
||||||
td {followersDelta}
|
td フォロワー数
|
||||||
td 昨日とのフォロワー数の差
|
tr
|
||||||
tr
|
td {notesDelta}
|
||||||
td {url}
|
td 昨日とのノート数の差
|
||||||
td みす廃アラートのURL
|
tr
|
||||||
tr
|
td {followingDelta}
|
||||||
td {ranking}
|
td 昨日とのフォロー数の差
|
||||||
td みす廃ランキングの順位
|
tr
|
||||||
tr
|
td {followersDelta}
|
||||||
td {rating}
|
td 昨日とのフォロワー数の差
|
||||||
td みす廃レート
|
tr
|
||||||
|
td {url}
|
||||||
|
td みす廃アラートのURL
|
||||||
|
tr
|
||||||
|
td {ranking}
|
||||||
|
td みす廃ランキングの順位
|
||||||
|
tr
|
||||||
|
td {rating}
|
||||||
|
td みす廃レート
|
||||||
button.primary(type="submit", tabindex=8) 保存
|
button.primary(type="submit", tabindex=8) 保存
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,15 +145,25 @@ block content
|
||||||
block script
|
block script
|
||||||
script.
|
script.
|
||||||
history.replaceState(null, null, '/');
|
history.replaceState(null, null, '/');
|
||||||
document.getElementById("send").addEventListener("click", (e) => {
|
document.getElementById('send').addEventListener('click', (e) => {
|
||||||
if (!confirm('現在の設定「!{currentAlertModeLabel}」に基づいてアラートを送信しますか?'))
|
if (!confirm('現在の設定「!{currentAlertModeLabel}」に基づいてアラートを送信しますか?'))
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
document.getElementById("optout").addEventListener("click", (e) => {
|
document.getElementById('optout').addEventListener('click', (e) => {
|
||||||
if (!confirm('連携を解除すると、統計情報などのデータが削除されてしまい、以後アラート機能をご利用いただけなくなります。この操作は変更できません。\n\nそれでもなお、連携を解除しますか?'))
|
if (!confirm('連携を解除すると、統計情報などのデータが削除されてしまい、以後アラート機能をご利用いただけなくなります。この操作は変更できません。\n\nそれでもなお、連携を解除しますか?'))
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
document.getElementById("logout").addEventListener("click", (e) => {
|
document.getElementById('logout').addEventListener('click', (e) => {
|
||||||
if (!confirm('ログアウトしますか?'))
|
if (!confirm('ログアウトしますか?'))
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
const hideWhenAlertModeNotNote = document.getElementById('hideWhenAlertModeNotNote');
|
||||||
|
const hideWhenAlertModeNothing = document.getElementById('hideWhenAlertModeNothing');
|
||||||
|
const alertModeSelector = document.getElementById('alertModeSelector');
|
||||||
|
const updateView = () => {
|
||||||
|
const value = alertModeSelector.value;
|
||||||
|
hideWhenAlertModeNotNote.style.display = value !== 'note' ? 'none' : 'block';
|
||||||
|
hideWhenAlertModeNothing.style.display = value === 'nothing' ? 'none' : 'block';
|
||||||
|
};
|
||||||
|
alertModeSelector.addEventListener('change', updateView);
|
||||||
|
updateView();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue