summaryrefslogtreecommitdiff
path: root/src/client/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/pages')
-rw-r--r--src/client/pages/my-settings/index.vue21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/client/pages/my-settings/index.vue b/src/client/pages/my-settings/index.vue
index 6fb3116912..7da9f24c75 100644
--- a/src/client/pages/my-settings/index.vue
+++ b/src/client/pages/my-settings/index.vue
@@ -22,6 +22,9 @@
<mk-button @click="readAllUnreadNotes">{{ $t('markAsReadAllUnreadNotes') }}</mk-button>
<mk-button @click="readAllMessagingMessages">{{ $t('markAsReadAllTalkMessages') }}</mk-button>
</div>
+ <div class="_content">
+ <mk-button @click="configure">{{ $t('notificationSetting') }}</mk-button>
+ </div>
</section>
<x-import-export class="_vMargin"/>
@@ -109,6 +112,24 @@ export default Vue.extend({
readAllNotifications() {
this.$root.api('notifications/mark-all-as-read');
},
+
+ async configure() {
+ this.$root.new(await import('../../components/notification-setting-window.vue').then(m => m.default), {
+ includingTypes: this.$store.state.i.includingNotificationTypes,
+ showGlobalToggle: false,
+ }).$on('ok', async ({ includingTypes: value }: any) => {
+ await this.$root.api('i/update', {
+ includingNotificationTypes: value,
+ }).then(i => {
+ this.$store.state.i.includingNotificationTypes = i.includingNotificationTypes;
+ }).catch(err => {
+ this.$root.dialog({
+ type: 'error',
+ text: err.message
+ });
+ });
+ });
+ }
}
});
</script>