通知の管理を強化

Resolve #3772
This commit is contained in:
syuilo
2018-12-28 05:06:25 +09:00
parent 8c762e7b8e
commit cce3e52642
6 changed files with 101 additions and 25 deletions

View File

@ -170,17 +170,7 @@
</section>
</ui-card>
<ui-card class="notification" v-show="page == 'notification'">
<div slot="title"><fa :icon="['far', 'bell']"/> {{ $t('notification') }}</div>
<section>
<ui-switch v-model="$store.state.i.settings.autoWatch" @change="onChangeAutoWatch">
{{ $t('auto-watch') }}<span slot="desc">{{ $t('auto-watch-desc') }}</span>
</ui-switch>
<section>
<ui-button @click="readAllUnreadNotes">{{ $t('mark-as-read-all-unread-notes') }}</ui-button>
</section>
</section>
</ui-card>
<x-notification-settings v-show="page == 'notification'"/>
<div class="drive" v-if="page == 'drive'">
<x-drive-settings/>
@ -289,6 +279,7 @@ import XPasswordSettings from '../../../common/views/components/password-setting
import XProfileEditor from '../../../common/views/components/profile-editor.vue';
import XApiSettings from '../../../common/views/components/api-settings.vue';
import XLanguageSettings from '../../../common/views/components/language-settings.vue';
import XNotificationSettings from '../../../common/views/components/notification-settings.vue';
import { url, clientVersion as version } from '../../../config';
import checkForUpdate from '../../../common/scripts/check-for-update';
@ -308,6 +299,7 @@ export default Vue.extend({
XProfileEditor,
XApiSettings,
XLanguageSettings,
XNotificationSettings,
},
props: {
initialPage: {
@ -531,9 +523,6 @@ export default Vue.extend({
});
},
methods: {
readAllUnreadNotes() {
this.$root.api('i/read_all_unread_notes');
},
customizeHome() {
this.$router.push('/i/customize-home');
this.$emit('done');
@ -552,11 +541,6 @@ export default Vue.extend({
wallpaperId: null
});
},
onChangeAutoWatch(v) {
this.$root.api('i/update', {
autoWatch: v
});
},
checkForUpdate() {
this.checkingForUpdate = true;
checkForUpdate(this.$root, true, true).then(newer => {