diff options
Diffstat (limited to 'src/client/widgets/notifications.vue')
| -rw-r--r-- | src/client/widgets/notifications.vue | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/client/widgets/notifications.vue b/src/client/widgets/notifications.vue index 24d7fe4200..9d6282735b 100644 --- a/src/client/widgets/notifications.vue +++ b/src/client/widgets/notifications.vue @@ -1,15 +1,16 @@ <template> <mk-container :style="`height: ${props.height}px;`" :show-header="props.showHeader" :scrollable="true"> <template #header><fa :icon="faBell"/>{{ $t('notifications') }}</template> + <template #func><button @click="configure()" class="_button"><fa :icon="faCog"/></button></template> <div> - <x-notifications/> + <x-notifications :include-types="props.includingTypes"/> </div> </mk-container> </template> <script lang="ts"> -import { faBell } from '@fortawesome/free-solid-svg-icons'; +import { faBell, faCog } from '@fortawesome/free-solid-svg-icons'; import MkContainer from '../components/ui/container.vue'; import XNotifications from '../components/notifications.vue'; import define from './define'; @@ -25,6 +26,11 @@ export default define({ type: 'number', default: 300, }, + includingTypes: { + type: 'array', + hidden: true, + default: null, + }, }) }).extend({ components: { @@ -34,8 +40,19 @@ export default define({ data() { return { - faBell + faBell, faCog }; }, + + methods: { + async configure() { + this.$root.new(await import('../components/notification-setting-window.vue').then(m => m.default), { + includingTypes: this.props.includingTypes, + }).$on('ok', async ({ includingTypes }) => { + this.props.includingTypes = includingTypes; + this.save(); + }); + } + } }); </script> |