settings: refactor settings store
read-only: pass flag with index.html response theme: clean & remove old themes
This commit is contained in:
parent
a6b82a4c93
commit
a588fb2b4a
23 changed files with 203 additions and 418 deletions
|
|
@ -17,7 +17,7 @@ class Theme {
|
|||
|
||||
init() {
|
||||
|
||||
this.themes = settings.read('theme')
|
||||
this.themes = settings.read('theme') || []
|
||||
this.files = []
|
||||
|
||||
for (let theme of this.themes) {
|
||||
|
|
@ -53,8 +53,8 @@ class Theme {
|
|||
|
||||
var css = this.get()
|
||||
|
||||
if (css.includes('--color-bg:')) {
|
||||
this.backgroundColor = css.match(/--color-bg:([^;]*);/)[1].trim()
|
||||
if (css.includes('--color-background:')) {
|
||||
this.backgroundColor = css.match(/--color-background:([^;]*);/)[1].trim()
|
||||
} else {
|
||||
this.backgroundColor = this.defaultColor
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue