mirror of
https://github.com/kaythomas0/noisedash.git
synced 2025-11-14 12:18:01 +00:00
Add accent color picker
This commit is contained in:
@@ -6,6 +6,9 @@ export default {
|
||||
isAdmin: false,
|
||||
loggedIn: false
|
||||
}),
|
||||
created () {
|
||||
this.getUserPreferences()
|
||||
},
|
||||
methods: {
|
||||
home () {
|
||||
this.$router.push('/')
|
||||
@@ -24,7 +27,7 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getCurrentUser () {
|
||||
checkForAdmin () {
|
||||
this.loggedIn = false
|
||||
this.drawyer = true
|
||||
this.$http.get('/users/current')
|
||||
@@ -32,12 +35,21 @@ export default {
|
||||
if (response.status === 200) {
|
||||
this.loggedIn = true
|
||||
this.isAdmin = response.data.user.isAdmin
|
||||
this.$vuetify.theme.dark = response.data.user.darkMode
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.isAdmin = false
|
||||
})
|
||||
},
|
||||
getUserPreferences () {
|
||||
this.$http.get('/users/current')
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
const preferences = response.data.user.preferences
|
||||
this.$vuetify.theme.themes.dark.primary = preferences.accentColor
|
||||
this.$vuetify.theme.themes.light.primary = preferences.accentColor
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user