mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-12 12:04:16 +00:00
use initialize method
This commit is contained in:
parent
16c97b51ab
commit
992f0ac259
@ -31,7 +31,17 @@ export default class ThemeExtension extends Extension {
|
|||||||
this.resetDefault()
|
this.resetDefault()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
await this.initialize()
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
static get currentVariant() {
|
||||||
|
return document.documentElement.style.getPropertyValue("--themeVariant")
|
||||||
|
}
|
||||||
|
|
||||||
|
initialize = async () => {
|
||||||
let theme = this.getStoragedTheme()
|
let theme = this.getStoragedTheme()
|
||||||
|
|
||||||
const modifications = this.getStoragedModifications()
|
const modifications = this.getStoragedModifications()
|
||||||
const variantKey = this.getStoragedVariant()
|
const variantKey = this.getStoragedVariant()
|
||||||
|
|
||||||
@ -57,11 +67,6 @@ export default class ThemeExtension extends Extension {
|
|||||||
|
|
||||||
// apply variation
|
// apply variation
|
||||||
this.applyVariant(variantKey)
|
this.applyVariant(variantKey)
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
static get currentVariant() {
|
|
||||||
return document.documentElement.style.getPropertyValue("--themeVariant")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getRootVariables = () => {
|
getRootVariables = () => {
|
||||||
@ -108,7 +113,7 @@ export default class ThemeExtension extends Extension {
|
|||||||
|
|
||||||
window.app.settings.set("primaryColor", this.theme.staticVars.primaryColor)
|
window.app.settings.set("primaryColor", this.theme.staticVars.primaryColor)
|
||||||
|
|
||||||
return this.init()
|
this.initialize()
|
||||||
}
|
}
|
||||||
|
|
||||||
update = (update) => {
|
update = (update) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user