mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
Correctly check for night mode
This commit is contained in:
parent
d6d4269aaf
commit
0133652d04
2 changed files with 2 additions and 4 deletions
|
@ -35,8 +35,6 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@use "ts/sass/button_mixins" as button;
|
|
||||||
|
|
||||||
button {
|
button {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ import { Writable, writable } from "svelte/store";
|
||||||
|
|
||||||
import EditorToolbarSvelte from "./EditorToolbar.svelte";
|
import EditorToolbarSvelte from "./EditorToolbar.svelte";
|
||||||
|
|
||||||
import { checkNightMode } from "anki/nightmode";
|
|
||||||
import { setupI18n, ModuleName } from "anki/i18n";
|
import { setupI18n, ModuleName } from "anki/i18n";
|
||||||
|
|
||||||
import "./bootstrap.css";
|
import "./bootstrap.css";
|
||||||
|
@ -59,7 +58,8 @@ class EditorToolbar extends HTMLElement {
|
||||||
props: {
|
props: {
|
||||||
buttons: this.buttons,
|
buttons: this.buttons,
|
||||||
menus: this.menus,
|
menus: this.menus,
|
||||||
nightMode: checkNightMode(),
|
nightMode: document.documentElement.classList.contains("night-mode"),
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue