Commit 9c7e7f5b authored by LianaHus's avatar LianaHus Committed by Liana Husikyan

save the theme for reload

parent 27aa909b
...@@ -77,7 +77,7 @@ export class ThemeModule extends Plugin { ...@@ -77,7 +77,7 @@ export class ThemeModule extends Plugin {
} }
const next = themeName || this.active // Name const next = themeName || this.active // Name
const nextTheme = this.themes[next] // Theme const nextTheme = this.themes[next] // Theme
if (!this.forced) this._deps.config.set('settings/theme', next) this._deps.config.set('settings/theme', next)
document.getElementById('theme-link').setAttribute('href', nextTheme.url) document.getElementById('theme-link').setAttribute('href', nextTheme.url)
document.documentElement.style.setProperty('--theme', nextTheme.quality) document.documentElement.style.setProperty('--theme', nextTheme.quality)
if (themeName) this.active = themeName if (themeName) this.active = themeName
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment