fix body classes changes when changing theme (#2199)

This commit is contained in:
BlueGreenMagick 2022-11-21 09:20:00 +09:00 committed by GitHub
parent 05b5abb856
commit 79f94d5a71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -708,12 +708,14 @@ html {{ {font} }}
const body = document.body.classList;
if ({1 if theme_manager.night_mode else 0}) {{
doc.add("night-mode");
body.add("night-mode");
body.add("night_mode");
body.add("nightMode");
{"body.add('macos-dark-mode');" if theme_manager.macos_dark_mode() else ""}
}} else {{
doc.remove("night-mode");
body.remove("night-mode");
body.remove("night_mode");
body.remove("nightMode");
body.remove("macos-dark-mode");
}}
}})();
"""