-
${frappe.utils.icon('tick', 'xs')}
+
+ ${frappe.utils.icon('tick', 'xs')}
+
@@ -115,20 +121,16 @@ frappe.ui.ThemeSwitcher = class ThemeSwitcher {
return preview;
}
- toggle_theme(theme, options = { save_preferences: true, show_alert: true }) {
+ toggle_theme(theme) {
this.current_theme = theme.toLowerCase();
document.documentElement.setAttribute("data-theme-mode", this.current_theme);
+ frappe.show_alert("Theme Changed", 3);
- if (options && options.show_alert) {
- frappe.show_alert("Theme Changed", 3);
- }
-
- if (options && options.save_preferences) {
- frappe.xcall("frappe.core.doctype.user.user.switch_theme", {
- theme: toTitle(theme)
- });
- }
+ frappe.xcall("frappe.core.doctype.user.user.switch_theme", {
+ theme: toTitle(theme)
+ });
}
+
show() {
this.dialog.show();
}
diff --git a/frappe/public/scss/desk/theme_switcher.scss b/frappe/public/scss/desk/theme_switcher.scss
index c8ff4d3bef..924c2edd9d 100644
--- a/frappe/public/scss/desk/theme_switcher.scss
+++ b/frappe/public/scss/desk/theme_switcher.scss
@@ -28,6 +28,7 @@
margin-right: var(--margin-sm);
border-radius: var(--border-radius-full);
+ z-index: 1;
}
}
@@ -84,7 +85,7 @@
}
// TODO: Replace with better alternative
-[data-theme="automatic"] {
+[data-is-auto-theme="true"] {
.background::after {
content: "";
top: 0;