Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
iisakkirotko committed Feb 8, 2024
1 parent 6ad60c2 commit bdaa3ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/src/Themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,18 @@ export class ThemeModel extends WidgetModel {
vuetify.framework.theme.dark = false;
this.set("dark", false);
this.save_changes();
} else if ( document.documentElement.matches("[theme=dark]") ) {
} else if (document.documentElement.matches("[theme=dark]")) {
vuetify.framework.theme.dark = true;
this.set("dark_effective", true);
this.save_changes();
} else if ( document.documentElement.matches("[theme=light]") ) {
} else if (document.documentElement.matches("[theme=light]")) {
vuetify.framework.theme.dark = false;
this.set("dark_effective", false);
this.save_changes();
} else {
let osPrefersDark = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
let osPrefersDark =
window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches;
vuetify.framework.theme.dark = osPrefersDark;
this.set("dark_effective", osPrefersDark);
this.save_changes();
Expand Down

0 comments on commit bdaa3ca

Please sign in to comment.