summaryrefslogtreecommitdiff
path: root/packages/frontend/src/widgets/WidgetNotifications.vue
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/widgets/WidgetNotifications.vue
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/widgets/WidgetNotifications.vue')
-rw-r--r--packages/frontend/src/widgets/WidgetNotifications.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/frontend/src/widgets/WidgetNotifications.vue b/packages/frontend/src/widgets/WidgetNotifications.vue
index 4b3265dab7..773c078b49 100644
--- a/packages/frontend/src/widgets/WidgetNotifications.vue
+++ b/packages/frontend/src/widgets/WidgetNotifications.vue
@@ -54,7 +54,7 @@ const { widgetProps, configure, save } = useWidgetPropsManager(name,
);
const configureNotification = () => {
- os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), {
+ const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), {
excludeTypes: widgetProps.excludeTypes,
}, {
done: async (res) => {
@@ -62,7 +62,8 @@ const configureNotification = () => {
widgetProps.excludeTypes = excludeTypes;
save();
},
- }, 'closed');
+ closed: () => dispose(),
+ });
};
defineExpose<WidgetComponentExpose>({