theme change is ready

This commit is contained in:
RockYang
2024-04-27 13:13:28 +08:00
parent 5e0be4d10e
commit b354b88876
20 changed files with 162 additions and 44 deletions

View File

@@ -1,6 +1,7 @@
import Storage from "good-storage";
const MOBILE_THEME = process.env.VUE_APP_KEY_PREFIX + "MOBILE_THEME"
const ADMIN_THEME = process.env.VUE_APP_KEY_PREFIX + "ADMIN_THEME"
export function getMobileTheme() {
return Storage.get(MOBILE_THEME) ? Storage.get(MOBILE_THEME) : 'light'
@@ -8,4 +9,12 @@ export function getMobileTheme() {
export function setMobileTheme(theme) {
Storage.set(MOBILE_THEME, theme)
}
export function getAdminTheme() {
return Storage.get(ADMIN_THEME) ? Storage.get(ADMIN_THEME) : 'light'
}
export function setAdminTheme(theme) {
Storage.set(ADMIN_THEME, theme)
}