Fix accent color picker

This commit is contained in:
Kay Thomas
2022-07-05 15:32:43 -07:00
parent d3cc1db2f9
commit 9b2bdaf159
3 changed files with 7 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ export default {
changePasswordDialog: false, changePasswordDialog: false,
isPasswordValid: false, isPasswordValid: false,
password: '', password: '',
accentColor: '#607d8b', accentColor: {},
snackbar: false, snackbar: false,
snackbarText: '', snackbarText: '',
rules: { rules: {
@@ -53,8 +53,8 @@ export default {
this.$http.patch('/users/preferences', { this.$http.patch('/users/preferences', {
preferences: preferences preferences: preferences
}) })
this.$vuetify.theme.themes.dark.primary = this.accentColor this.$vuetify.theme.themes.dark.primary = this.accentColor.hex
this.$vuetify.theme.themes.light.primary = this.accentColor this.$vuetify.theme.themes.light.primary = this.accentColor.hex
} }
} }
} }

View File

@@ -46,8 +46,8 @@ export default {
.then(response => { .then(response => {
if (response.status === 200) { if (response.status === 200) {
const preferences = response.data.user.preferences const preferences = response.data.user.preferences
this.$vuetify.theme.themes.dark.primary = preferences.accentColor this.$vuetify.theme.themes.dark.primary = preferences.accentColor.hex
this.$vuetify.theme.themes.light.primary = preferences.accentColor this.$vuetify.theme.themes.light.primary = preferences.accentColor.hex
} }
}) })
} }

View File

@@ -490,8 +490,8 @@ export default {
this.canUpload = response.data.user.canUpload this.canUpload = response.data.user.canUpload
this.$vuetify.theme.dark = response.data.user.darkMode this.$vuetify.theme.dark = response.data.user.darkMode
const preferences = response.data.user.preferences const preferences = response.data.user.preferences
this.$vuetify.theme.themes.dark.primary = preferences.accentColor this.$vuetify.theme.themes.dark.primary = preferences.accentColor.hex
this.$vuetify.theme.themes.light.primary = preferences.accentColor this.$vuetify.theme.themes.light.primary = preferences.accentColor.hex
} }
}) })
}, },