added getValue to methods

This commit is contained in:
srgooglo 2022-06-29 19:30:24 +02:00
parent 6bf6b8f9a4
commit 424b6bcc1f

View File

@ -123,6 +123,20 @@ export default class StyleCore extends Core {
return app.settings.get("themeVariant") return app.settings.get("themeVariant")
} }
getValue = (key) => {
if (typeof key === "undefined") {
return {
...staticValues,
...storagedModifications
}
}
const storagedModifications = this.getStoragedModifications()
const staticValues = this.theme.staticVars
return storagedModifications[key] || staticValues[key]
}
setVariant = (variationKey) => { setVariant = (variationKey) => {
return app.settings.set("themeVariant", variationKey) return app.settings.set("themeVariant", variationKey)
} }