2018-11-06 15:08:17 +01:00
|
|
|
<template>
|
|
|
|
<div id="timeline">
|
|
|
|
<div class="unread-notification section">
|
|
|
|
<h3>{{ $t('settings.timeline.unread_notification.title') }}</h3>
|
|
|
|
<p class="description">{{ $t('settings.timeline.unread_notification.description') }}</p>
|
|
|
|
<table class="table">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="title">
|
|
|
|
{{ $t('settings.timeline.unread_notification.direct') }}
|
|
|
|
</td>
|
|
|
|
<td class="status">
|
|
|
|
<el-switch v-model="direct" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="title">
|
|
|
|
{{ $t('settings.timeline.unread_notification.local') }}
|
|
|
|
</td>
|
|
|
|
<td class="status">
|
|
|
|
<el-switch v-model="local" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="title">
|
|
|
|
{{ $t('settings.timeline.unread_notification.public') }}
|
|
|
|
</td>
|
|
|
|
<td class="status">
|
|
|
|
<el-switch v-model="public" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</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;
|
|
|
|
}
|
|
|
|
|
|
|
|
.section {
|
|
|
|
margin-bottom: 40px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.table {
|
|
|
|
tr {
|
|
|
|
height: 3rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
width: 200px;
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status {
|
|
|
|
width: 200px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|