2018-12-27 22:06:25 +02:00
|
|
|
<template>
|
|
|
|
<ui-card>
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa :icon="['far', 'bell']"/> {{ $t('title') }}</template>
|
2018-12-27 22:06:25 +02:00
|
|
|
<section>
|
2019-04-07 15:50:36 +03:00
|
|
|
<ui-switch v-model="$store.state.i.autoWatch" @change="onChangeAutoWatch">
|
2019-02-18 04:13:56 +02:00
|
|
|
{{ $t('auto-watch') }}<template #desc>{{ $t('auto-watch-desc') }}</template>
|
2018-12-27 22:06:25 +02:00
|
|
|
</ui-switch>
|
|
|
|
<section>
|
|
|
|
<ui-button @click="readAllNotifications">{{ $t('mark-as-read-all-notifications') }}</ui-button>
|
|
|
|
<ui-button @click="readAllUnreadNotes">{{ $t('mark-as-read-all-unread-notes') }}</ui-button>
|
|
|
|
<ui-button @click="readAllMessagingMessages">{{ $t('mark-as-read-all-talk-messages') }}</ui-button>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2019-03-01 03:42:28 +02:00
|
|
|
import i18n from '../../../../i18n';
|
2018-12-27 22:06:25 +02:00
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
i18n: i18n('common/views/components/notification-settings.vue'),
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
onChangeAutoWatch(v) {
|
|
|
|
this.$root.api('i/update', {
|
|
|
|
autoWatch: v
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
readAllUnreadNotes() {
|
|
|
|
this.$root.api('i/read_all_unread_notes');
|
|
|
|
},
|
|
|
|
|
|
|
|
readAllMessagingMessages() {
|
|
|
|
this.$root.api('i/read_all_messaging_messages');
|
|
|
|
},
|
|
|
|
|
|
|
|
readAllNotifications() {
|
|
|
|
this.$root.api('notifications/mark_all_as_read');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|