mirror of
https://github.com/zadam/trilium.git
synced 2026-02-27 17:13:38 +01:00
client/theming: include the current theme ID as an attribute on the body element
This commit is contained in:
parent
f0e8c0f79d
commit
dfb44def2b
@ -73,8 +73,9 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
|
||||
#initTheme() {
|
||||
const colorSchemeChangeObserver = matchMedia("(prefers-color-scheme: dark)")
|
||||
colorSchemeChangeObserver.addEventListener("change", () => this.#updateColorScheme());
|
||||
|
||||
this.#updateColorScheme();
|
||||
|
||||
document.body.setAttribute("data-theme-id", options.get("theme"));
|
||||
}
|
||||
|
||||
#updateColorScheme() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user