diff options
Diffstat (limited to 'src/client/components/deck/notifications-column.vue')
| -rw-r--r-- | src/client/components/deck/notifications-column.vue | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/client/components/deck/notifications-column.vue b/src/client/components/deck/notifications-column.vue index 331cb9207f..ac49aec06d 100644 --- a/src/client/components/deck/notifications-column.vue +++ b/src/client/components/deck/notifications-column.vue @@ -2,7 +2,7 @@ <x-column :column="column" :is-stacked="isStacked" :menu="menu"> <template #header><fa :icon="faBell" style="margin-right: 8px;"/>{{ column.name }}</template> - <x-notifications/> + <x-notifications :include-types="column.includingTypes"/> </x-column> </template> @@ -38,28 +38,14 @@ export default Vue.extend({ }, created() { - if (this.column.notificationType == null) { - this.column.notificationType = 'all'; - this.$store.commit('deviceUser/updateDeckColumn', this.column); - } - this.menu = [{ icon: faCog, - text: this.$t('notificationType'), - action: () => { - this.$root.dialog({ - title: this.$t('notificationType'), - type: null, - select: { - items: ['all', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest'].map(x => ({ - value: x, text: this.$t(`_notification._types.${x}`) - })) - default: this.column.notificationType, - }, - showCancelButton: true - }).then(({ canceled, result: type }) => { - if (canceled) return; - this.column.notificationType = type; + text: this.$t('notificationSetting'), + action: async () => { + this.$root.new(await import('../notification-setting-window.vue').then(m => m.default), { + includingTypes: this.column.includingTypes, + }).$on('ok', async ({ includingTypes }) => { + this.$set(this.column, 'includingTypes', includingTypes); this.$store.commit('deviceUser/updateDeckColumn', this.column); }); } |