summaryrefslogtreecommitdiff
path: root/packages/frontend/src/ui/_common_
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2024-07-04 13:14:49 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2024-07-04 13:14:49 +0900
commit6dd2e9fc0b1eeea6b5f04ccac93ccfab658f976d (patch)
tree53a677d4fdaa802774a133272ed2f5f1180dd4fa /packages/frontend/src/ui/_common_
parentfix(storybook): build skipping even after updating impl story files (#14124) (diff)
downloadsharkey-6dd2e9fc0b1eeea6b5f04ccac93ccfab658f976d.tar.gz
sharkey-6dd2e9fc0b1eeea6b5f04ccac93ccfab658f976d.tar.bz2
sharkey-6dd2e9fc0b1eeea6b5f04ccac93ccfab658f976d.zip
refactor(frontend): refactor popup api and make sure call dispose callback
Close #14122
Diffstat (limited to 'packages/frontend/src/ui/_common_')
-rw-r--r--packages/frontend/src/ui/_common_/common.ts4
-rw-r--r--packages/frontend/src/ui/_common_/navbar-for-mobile.vue5
-rw-r--r--packages/frontend/src/ui/_common_/navbar.vue5
3 files changed, 9 insertions, 5 deletions
diff --git a/packages/frontend/src/ui/_common_/common.ts b/packages/frontend/src/ui/_common_/common.ts
index 839fa5faf8..20a280f681 100644
--- a/packages/frontend/src/ui/_common_/common.ts
+++ b/packages/frontend/src/ui/_common_/common.ts
@@ -112,7 +112,9 @@ export function openInstanceMenu(ev: MouseEvent) {
text: i18n.ts._initialTutorial.launchTutorial,
icon: 'ti ti-presentation',
action: () => {
- os.popup(defineAsyncComponent(() => import('@/components/MkTutorialDialog.vue')), {}, {}, 'closed');
+ const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkTutorialDialog.vue')), {}, {
+ closed: () => dispose(),
+ });
},
} : undefined, {
type: 'link',
diff --git a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue
index 5d0e065f09..699aa1e1c8 100644
--- a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue
+++ b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue
@@ -74,8 +74,9 @@ function openAccountMenu(ev: MouseEvent) {
}
function more() {
- os.popup(defineAsyncComponent(() => import('@/components/MkLaunchPad.vue')), {}, {
- }, 'closed');
+ const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkLaunchPad.vue')), {}, {
+ closed: () => dispose(),
+ });
}
</script>
diff --git a/packages/frontend/src/ui/_common_/navbar.vue b/packages/frontend/src/ui/_common_/navbar.vue
index fa1f0eb8c7..b029533f28 100644
--- a/packages/frontend/src/ui/_common_/navbar.vue
+++ b/packages/frontend/src/ui/_common_/navbar.vue
@@ -99,10 +99,11 @@ function openAccountMenu(ev: MouseEvent) {
}
function more(ev: MouseEvent) {
- os.popup(defineAsyncComponent(() => import('@/components/MkLaunchPad.vue')), {
+ const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkLaunchPad.vue')), {
src: ev.currentTarget ?? ev.target,
}, {
- }, 'closed');
+ closed: () => dispose(),
+ });
}
</script>