diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2022-05-28 01:31:23 +0900 |
|---|---|---|
| committer | tamaina <tamaina@hotmail.co.jp> | 2022-05-28 01:31:23 +0900 |
| commit | fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb (patch) | |
| tree | 43d941bbacc9cfaa911fc785fce0b34af4ef6fcc /packages/client/src/scripts/get-user-menu.ts | |
| parent | Merge branch 'develop' into pizzax-indexeddb (diff) | |
| parent | fix(docs): correct information for drive upload (#8736) (diff) | |
| download | sharkey-fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb.tar.gz sharkey-fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb.tar.bz2 sharkey-fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb.zip | |
Merge branch 'develop' into pizzax-indexeddb
Diffstat (limited to 'packages/client/src/scripts/get-user-menu.ts')
| -rw-r--r-- | packages/client/src/scripts/get-user-menu.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/client/src/scripts/get-user-menu.ts b/packages/client/src/scripts/get-user-menu.ts index 192d14b83e..1d2b761117 100644 --- a/packages/client/src/scripts/get-user-menu.ts +++ b/packages/client/src/scripts/get-user-menu.ts @@ -6,6 +6,7 @@ import * as os from '@/os'; import { userActions } from '@/store'; import { router } from '@/router'; import { $i, iAmModerator } from '@/account'; +import { defineAsyncComponent } from 'vue'; export function getUserMenu(user) { const meId = $i ? $i.id : null; @@ -127,7 +128,7 @@ export function getUserMenu(user) { } function reportAbuse() { - os.popup(import('@/components/abuse-report-window.vue'), { + os.popup(defineAsyncComponent(() => import('@/components/abuse-report-window.vue')), { user: user, }, {}, 'closed'); } @@ -168,7 +169,7 @@ export function getUserMenu(user) { action: () => { os.post({ specified: user }); } - }, meId != user.id ? { + }, meId !== user.id ? { type: 'link', icon: 'fas fa-comments', text: i18n.ts.startMessaging, @@ -177,13 +178,13 @@ export function getUserMenu(user) { icon: 'fas fa-list-ul', text: i18n.ts.addToList, action: pushList - }, meId != user.id ? { + }, meId !== user.id ? { icon: 'fas fa-users', text: i18n.ts.inviteToGroup, action: inviteGroup } : undefined] as any; - if ($i && meId != user.id) { + if ($i && meId !== user.id) { menu = menu.concat([null, { icon: user.isMuted ? 'fas fa-eye' : 'fas fa-eye-slash', text: user.isMuted ? i18n.ts.unmute : i18n.ts.mute, |