diff options
Diffstat (limited to 'packages/frontend/src/scripts/get-user-menu.ts')
| -rw-r--r-- | packages/frontend/src/scripts/get-user-menu.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index f5aa551bdb..d7eb331183 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -53,6 +53,14 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router } } + async function toggleRenoteMute() { + os.apiWithDialog(user.isRenoteMuted ? 'renote-mute/delete' : 'renote-mute/create', { + userId: user.id, + }).then(() => { + user.isRenoteMuted = !user.isRenoteMuted; + }); + } + async function toggleBlock() { if (!await getConfirmed(user.isBlocking ? i18n.ts.unblockConfirm : i18n.ts.blockConfirm)) return; @@ -180,6 +188,10 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router text: user.isMuted ? i18n.ts.unmute : i18n.ts.mute, action: toggleMute, }, { + icon: user.isRenoteMuted ? 'ti ti-repeat' : 'ti ti-repeat-off', + text: user.isRenoteMuted ? i18n.ts.renoteUnmute : i18n.ts.renoteMute, + action: toggleRenoteMute, + }, { icon: 'ti ti-ban', text: user.isBlocking ? i18n.ts.unblock : i18n.ts.block, action: toggleBlock, |