Add Admin role & split settings between appSettings and userPreferences

This commit is contained in:
Bubka
2023-02-17 17:12:53 +01:00
parent d0401ced5d
commit 5e5e50d053
36 changed files with 389 additions and 215 deletions

5
resources/js/app.js vendored
View File

@ -17,6 +17,7 @@ const app = new Vue({
data: {
appSettings: window.appSettings,
appConfig: window.appConfig,
userPreferences: window.userPreferences,
isDemoApp: window.isDemoApp,
isTestingApp: window.isTestingApp,
prefersDarkScheme: window.matchMedia('(prefers-color-scheme: dark)').matches
@ -24,8 +25,8 @@ const app = new Vue({
computed: {
showDarkMode: function() {
return this.appSettings.theme == 'dark' ||
(this.appSettings.theme == 'system' && this.prefersDarkScheme)
return this.userPreferences.theme == 'dark' ||
(this.userPreferences.theme == 'system' && this.prefersDarkScheme)
}
},