-
-
-
-
+
+
+
+
+
+
+
+
-
@@ -217,7 +223,7 @@
Import your data into Vikunja
@@ -266,8 +272,8 @@ import EmailUpdateService from '../../services/emailUpdate'
import EmailUpdateModel from '../../models/emailUpdate'
import TotpModel from '../../models/totp'
import TotpService from '../../services/totp'
-import UserNameService from '../../services/userName'
-import UserNameModel from '../../models/userName'
+import UserSettingsService from '../../services/userSettings'
+import UserSettingsModel from '../../models/userSettings'
import {mapState} from 'vuex'
@@ -295,8 +301,8 @@ export default {
caldavUrl: '',
- name: '',
- userNameService: UserNameService,
+ settings: UserSettingsModel,
+ userSettingsService: UserSettingsService,
}
},
components: {
@@ -312,8 +318,11 @@ export default {
this.totpService = new TotpService()
this.totp = new TotpModel()
- this.userNameService = new UserNameService()
- this.name = this.$store.state.auth.info.name
+ this.userSettingsService = new UserSettingsService()
+ this.settings = new UserSettingsModel({
+ name: this.$store.state.auth.info.name,
+ emailRemindersEnabled: this.$store.state.auth.info.emailRemindersEnabled ?? false,
+ })
this.totpStatus()
this.buildCaldavUrl()
@@ -399,12 +408,10 @@ export default {
})
.catch(e => this.error(e, this))
},
- updateName() {
- const name = new UserNameModel({name: this.name})
-
- this.userNameService.update(name)
+ updateSettings() {
+ this.userSettingsService.update(this.settings)
.then(() => {
- this.$store.commit('auth/setUserName', this.name)
+ this.$store.commit('auth/setUserSettings', this.settings)
this.success({message: 'The name was successfully changed.'}, this)
})
.catch(e => this.error(e, this))