From 8b2e862de01a4a9d09b1f6013f677806f97f84e0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 21 Sep 2020 11:30:30 +0900 Subject: [PATCH] wip --- src/client/components/deck/notifications-column.vue | 12 ++++++++---- src/client/widgets/notifications.vue | 4 +++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/client/components/deck/notifications-column.vue b/src/client/components/deck/notifications-column.vue index 94efe8a03f..dccaa73e03 100644 --- a/src/client/components/deck/notifications-column.vue +++ b/src/client/components/deck/notifications-column.vue @@ -43,11 +43,15 @@ export default defineComponent({ icon: faCog, text: this.$t('notificationSetting'), action: async () => { - os.modal(await import('../notification-setting-window.vue'), { + os.modal(await import('@/components/notification-setting-window.vue'), { includingTypes: this.column.includingTypes, - }).$on('ok', async ({ includingTypes }) => { - this.$set(this.column, 'includingTypes', includingTypes); - this.$store.commit('deviceUser/updateDeckColumn', this.column); + }).then(async (res) => { + if (res == null) return; + const { includingTypes } = res; + this.$store.commit('deviceUser/updateDeckColumn', { + ...this.column, + includingTypes: includingTypes + }); }); } }]; diff --git a/src/client/widgets/notifications.vue b/src/client/widgets/notifications.vue index ab96e9707e..e7caf96ac5 100644 --- a/src/client/widgets/notifications.vue +++ b/src/client/widgets/notifications.vue @@ -54,7 +54,9 @@ export default defineComponent({ async configure() { os.modal(await import('@/components/notification-setting-window.vue'), { includingTypes: this.props.includingTypes, - }).then(async ({ includingTypes }) => { + }).then(async (res) => { + if (res == null) return; + const { includingTypes } = res; this.props.includingTypes = includingTypes; this.save(); });