pleroma-fe/src/components/settings_modal/tabs/notifications_tab.js

34 行
855 B
JavaScript
Raw 通常表示 履歴

import BooleanSetting from '../helpers/boolean_setting.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
2020-05-03 23:36:12 +09:00
const NotificationsTab = {
2020-05-03 23:36:12 +09:00
data () {
return {
activeTab: 'profile',
notificationSettings: this.$store.state.users.currentUser.notification_settings,
newDomainToMute: ''
}
},
components: {
BooleanSetting
2020-05-03 23:36:12 +09:00
},
computed: {
user () {
return this.$store.state.users.currentUser
},
canReceiveReports () {
if (!this.user) { return false }
return this.user.privileges.includes('reports_manage_reports')
},
...SharedComputedObject()
2020-05-03 23:36:12 +09:00
},
methods: {
updateNotificationSettings () {
this.$store.state.api.backendInteractor
.updateNotificationSettings({ settings: this.notificationSettings })
}
}
}
export default NotificationsTab