Improve UX
This commit is contained in:
parent
c3b19bbf30
commit
ccd496722a
1 changed files with 72 additions and 60 deletions
|
@ -70,9 +70,10 @@ block content
|
|||
| スコア通知方法に「Misskey に通知」を選んでいる場合、Groundpolis v3 および Misskey v12 の最新版以外では動作しません。めいすきーや古いバージョンをお使いの方は、「自動的にノートを投稿」をお使いください。
|
||||
form(method="post", action="/update-settings")
|
||||
p: label スコア通知方法:
|
||||
select(name="alertMode", tabindex=1)
|
||||
select#alertModeSelector(name="alertMode", tabindex=1)
|
||||
each set in alertModes
|
||||
option(value=set[0], selected=(user.alertMode === set[0]))= set[1]
|
||||
#hideWhenAlertModeNotNote
|
||||
p: label 公開範囲:
|
||||
select(name="visibility", tabindex=2)
|
||||
each set in visibilities
|
||||
|
@ -89,6 +90,7 @@ block content
|
|||
label
|
||||
input(type="radio", name="flag", value="remoteFollowersOnly", checked=user.remoteFollowersOnly, tabindex=5)
|
||||
| リモートフォロワーとローカル<br />
|
||||
#hideWhenAlertModeNothing
|
||||
div
|
||||
label 投稿テンプレート
|
||||
div: textarea(name="template", disabled, tabindex=6)
|
||||
|
@ -143,15 +145,25 @@ block content
|
|||
block script
|
||||
script.
|
||||
history.replaceState(null, null, '/');
|
||||
document.getElementById("send").addEventListener("click", (e) => {
|
||||
document.getElementById('send').addEventListener('click', (e) => {
|
||||
if (!confirm('現在の設定「!{currentAlertModeLabel}」に基づいてアラートを送信しますか?'))
|
||||
e.preventDefault();
|
||||
});
|
||||
document.getElementById("optout").addEventListener("click", (e) => {
|
||||
document.getElementById('optout').addEventListener('click', (e) => {
|
||||
if (!confirm('連携を解除すると、統計情報などのデータが削除されてしまい、以後アラート機能をご利用いただけなくなります。この操作は変更できません。\n\nそれでもなお、連携を解除しますか?'))
|
||||
e.preventDefault();
|
||||
});
|
||||
document.getElementById("logout").addEventListener("click", (e) => {
|
||||
document.getElementById('logout').addEventListener('click', (e) => {
|
||||
if (!confirm('ログアウトしますか?'))
|
||||
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