2018-08-29 17:28:43 +02:00
|
|
|
<template>
|
|
|
|
<div id="notification">
|
|
|
|
<h2>{{ $t('preferences.notification.title') }}</h2>
|
2018-09-20 17:49:17 +02:00
|
|
|
<div class="enable">
|
|
|
|
<p class="description">{{ $t('preferences.notification.enable.description') }}</p>
|
|
|
|
<div class="selection">
|
|
|
|
<span class="value">
|
|
|
|
<el-switch
|
|
|
|
v-model="notifyReply"
|
|
|
|
active-color="#13ce66">
|
|
|
|
</el-switch>
|
|
|
|
</span>
|
|
|
|
<span class="title">{{ $t('preferences.notification.enable.reply') }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="selection">
|
|
|
|
<span class="value">
|
|
|
|
<el-switch
|
|
|
|
v-model="notifyReblog"
|
|
|
|
active-color="#13ce66">
|
|
|
|
</el-switch>
|
|
|
|
</span>
|
|
|
|
<span class="title">{{ $t('preferences.notification.enable.reblog') }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="selection">
|
|
|
|
<span class="value">
|
|
|
|
<el-switch
|
|
|
|
v-model="notifyFavourite"
|
|
|
|
active-color="#13ce66">
|
|
|
|
</el-switch>
|
|
|
|
</span>
|
|
|
|
<span class="title">{{ $t('preferences.notification.enable.favourite') }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="selection">
|
|
|
|
<span class="value">
|
|
|
|
<el-switch
|
|
|
|
v-model="notifyFollow"
|
|
|
|
active-color="#13ce66">
|
|
|
|
</el-switch>
|
|
|
|
</span>
|
|
|
|
<span class="title">{{ $t('preferences.notification.enable.follow') }}</span>
|
|
|
|
</div>
|
2018-08-29 17:28:43 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-08-29 17:56:56 +02:00
|
|
|
name: 'notification',
|
|
|
|
computed: {
|
|
|
|
notifyReply: {
|
|
|
|
get () {
|
|
|
|
return this.$store.state.Preferences.Notification.notification.notify.reply
|
|
|
|
},
|
|
|
|
set (value) {
|
|
|
|
this.$store.dispatch('Preferences/Notification/updateNotify', {
|
|
|
|
reply: value
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
notifyReblog: {
|
|
|
|
get () {
|
|
|
|
return this.$store.state.Preferences.Notification.notification.notify.reblog
|
|
|
|
},
|
|
|
|
set (value) {
|
|
|
|
this.$store.dispatch('Preferences/Notification/updateNotify', {
|
|
|
|
reblog: value
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
notifyFavourite: {
|
|
|
|
get () {
|
|
|
|
return this.$store.state.Preferences.Notification.notification.notify.favourite
|
|
|
|
},
|
|
|
|
set (value) {
|
|
|
|
this.$store.dispatch('Preferences/Notification/updateNotify', {
|
|
|
|
favourite: value
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
notifyFollow: {
|
|
|
|
get () {
|
|
|
|
return this.$store.state.Preferences.Notification.notification.notify.follow
|
|
|
|
},
|
|
|
|
set (value) {
|
|
|
|
this.$store.dispatch('Preferences/Notification/updateNotify', {
|
|
|
|
follow: value
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2018-08-30 01:34:11 +02:00
|
|
|
},
|
|
|
|
created () {
|
|
|
|
this.$store.dispatch('Preferences/Notification/loadNotification')
|
|
|
|
.catch(() => {
|
|
|
|
this.$message({
|
|
|
|
message: this.$t('message.preferences_load_error'),
|
|
|
|
type: 'error'
|
|
|
|
})
|
|
|
|
})
|
2018-08-29 17:56:56 +02:00
|
|
|
}
|
2018-08-29 17:28:43 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
#notification {
|
2018-09-20 17:49:17 +02:00
|
|
|
.description {
|
|
|
|
margin: 24px 0 20px;
|
|
|
|
}
|
2018-08-29 17:28:43 +02:00
|
|
|
|
2018-09-20 17:49:17 +02:00
|
|
|
.selection {
|
|
|
|
margin: 12px 0;
|
2018-08-29 17:28:43 +02:00
|
|
|
|
|
|
|
.title {
|
2018-09-20 17:49:17 +02:00
|
|
|
margin-left: 12px;
|
|
|
|
font-weight: 800;
|
2018-08-29 17:28:43 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|