2018-11-06 15:08:17 +01:00
|
|
|
<template>
|
|
|
|
<div id="timeline">
|
2018-12-12 01:19:47 +01:00
|
|
|
<h2>{{ $t('settings.timeline.title') }}</h2>
|
|
|
|
<el-form class="unread-notification section" size="medium" label-position="right" label-width="250px">
|
2018-11-06 15:08:17 +01:00
|
|
|
<h3>{{ $t('settings.timeline.unread_notification.title') }}</h3>
|
|
|
|
<p class="description">{{ $t('settings.timeline.unread_notification.description') }}</p>
|
2018-12-12 01:19:47 +01:00
|
|
|
|
|
|
|
<el-form-item for="direct" :label="$t('settings.timeline.unread_notification.direct')">
|
|
|
|
<el-switch v-model="direct" id="direct" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item for="local" :label="$t('settings.timeline.unread_notification.local')">
|
|
|
|
<el-switch v-model="local" id="local" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item for="public" :label="$t('settings.timeline.unread_notification.public')">
|
|
|
|
<el-switch v-model="public" id="public" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
2018-11-06 15:08:17 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'Timeline',
|
|
|
|
computed: {
|
|
|
|
direct: {
|
|
|
|
get () {
|
2018-11-08 00:12:51 +01:00
|
|
|
return this.$store.state.Settings.Timeline.unreadNotification.direct
|
2018-11-06 15:08:17 +01:00
|
|
|
},
|
|
|
|
set (value) {
|
2018-11-07 14:48:50 +01:00
|
|
|
this.$store.dispatch('Settings/Timeline/changeUnreadNotification', {
|
|
|
|
direct: value
|
|
|
|
})
|
2018-11-06 15:08:17 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
local: {
|
|
|
|
get () {
|
2018-11-08 00:12:51 +01:00
|
|
|
return this.$store.state.Settings.Timeline.unreadNotification.local
|
2018-11-06 15:08:17 +01:00
|
|
|
},
|
|
|
|
set (value) {
|
2018-11-07 14:48:50 +01:00
|
|
|
this.$store.dispatch('Settings/Timeline/changeUnreadNotification', {
|
|
|
|
local: value
|
|
|
|
})
|
2018-11-06 15:08:17 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
public: {
|
|
|
|
get () {
|
2018-11-08 00:12:51 +01:00
|
|
|
return this.$store.state.Settings.Timeline.unreadNotification.public
|
2018-11-06 15:08:17 +01:00
|
|
|
},
|
|
|
|
set (value) {
|
2018-11-07 14:48:50 +01:00
|
|
|
this.$store.dispatch('Settings/Timeline/changeUnreadNotification', {
|
|
|
|
public: value
|
|
|
|
})
|
2018-11-06 15:08:17 +01:00
|
|
|
}
|
|
|
|
}
|
2018-11-07 14:48:50 +01:00
|
|
|
},
|
|
|
|
async created () {
|
|
|
|
await this.$store.dispatch('Settings/Timeline/loadUnreadNotification')
|
2018-11-06 15:08:17 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
#timeline {
|
|
|
|
.description {
|
|
|
|
margin: 32px 0 20px;
|
|
|
|
}
|
|
|
|
|
2018-12-12 01:19:47 +01:00
|
|
|
.section /deep/ {
|
2018-11-06 15:08:17 +01:00
|
|
|
margin-bottom: 40px;
|
|
|
|
|
2018-12-12 01:19:47 +01:00
|
|
|
.el-form-item__label {
|
|
|
|
color: var(--theme-primary-color);
|
2018-11-06 15:08:17 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|