summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/please-login.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/scripts/please-login.ts')
-rw-r--r--packages/frontend/src/scripts/please-login.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/frontend/src/scripts/please-login.ts b/packages/frontend/src/scripts/please-login.ts
index 9e51272791..363da5f633 100644
--- a/packages/frontend/src/scripts/please-login.ts
+++ b/packages/frontend/src/scripts/please-login.ts
@@ -11,7 +11,7 @@ import { popup } from '@/os.js';
export function pleaseLogin(path?: string) {
if ($i) return;
- popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), {
+ const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), {
autoSet: true,
message: i18n.ts.signinRequired,
}, {
@@ -20,7 +20,8 @@ export function pleaseLogin(path?: string) {
window.location.href = path;
}
},
- }, 'closed');
+ closed: () => dispose(),
+ });
throw new Error('signin required');
}