mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
Fix theme switcher showing wrong value
This commit is contained in:
@@ -12,6 +12,7 @@ if (preference) {
|
||||
|
||||
export default function setupThemeSelector() {
|
||||
const themeSwitch: HTMLInputElement = document.querySelector(".theme-selection input")!;
|
||||
themeSwitch.checked = preference ? preference === "dark" : true;
|
||||
themeSwitch?.addEventListener("change", () => {
|
||||
if (themeSwitch.checked) {
|
||||
document.body.classList.add("theme-dark");
|
||||
|
||||
Reference in New Issue
Block a user