- {{ $t('title') }}
-
+ {{ props.type === 'all' ? $t('title') : $t('@.notification-types.' + props.type) }}
+
-
+
@@ -16,13 +16,28 @@ import i18n from '../../../i18n';
export default define({
name: 'notifications',
props: () => ({
- compact: false
+ compact: false,
+ type: 'all'
})
}).extend({
i18n: i18n('desktop/views/widgets/notifications.vue'),
methods: {
settings() {
- alert('not implemented yet');
+ this.$root.dialog({
+ title: this.$t('@.notification-type'),
+ 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.props.type,
+ },
+ showCancelButton: true
+ }).then(({ canceled, result: type }) => {
+ if (canceled) return;
+ this.props.type = type;
+ this.save();
+ });
},
func() {
this.props.compact = !this.props.compact;