mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix initialisation of notification settings
This commit is contained in:
parent
6047f567b2
commit
92b3e27c40
@ -24,7 +24,15 @@ import { updateUserMutation } from '~/graphql/User'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
emailNotificationSettings: [...this.currentUser.emailNotificationSettings],
|
||||
emailNotificationSettings: {
|
||||
commentOnObservedPost: true,
|
||||
postByFollowedUser: true,
|
||||
postInGroup: true,
|
||||
groupMemberJoined: true,
|
||||
groupMemberLeft: true,
|
||||
groupMemberRemoved: true,
|
||||
groupMemberRoleChanged: true,
|
||||
},
|
||||
topics: [
|
||||
{
|
||||
id: 'commentOnObservedPost',
|
||||
@ -32,13 +40,13 @@ export default {
|
||||
},
|
||||
{ id: 'postByFollowedUser', name: this.$t('settings.notifications.postByFollowedUser') },
|
||||
{ id: 'postInGroup', name: this.$t('settings.notifications.postInGroup') },
|
||||
{ id: 'groupMemberJoined', name: this.$t('settings.notifications.groupMemberJoined') },
|
||||
{ id: 'groupMemberLeft', name: this.$t('settings.notifications.groupMemberLeft') },
|
||||
{ id: 'groupMemberRemoved', name: this.$t('settings.notifications.groupMemberRemoved') },
|
||||
{
|
||||
id: 'groupMemberRoleChanged',
|
||||
name: this.$t('settings.notifications.groupMemberRoleChanged'),
|
||||
},
|
||||
{ id: 'groupMemberJoined', name: this.$t('settings.notifications.groupMemberJoined') },
|
||||
{ id: 'groupMemberLeft', name: this.$t('settings.notifications.groupMemberLeft') },
|
||||
],
|
||||
}
|
||||
},
|
||||
@ -52,6 +60,9 @@ export default {
|
||||
)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.emailNotificationSettings = { ...this.currentUser.emailNotificationSettings }
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({
|
||||
setCurrentUser: 'auth/SET_USER',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user