34 lines
660 B
JavaScript
34 lines
660 B
JavaScript
frappe.ui.ThemeSwitcher = class CustomThemeSwitcher extends frappe.ui.ThemeSwitcher {
|
|
constructor() {
|
|
super()
|
|
}
|
|
|
|
fetch_themes() {
|
|
return new Promise((resolve) => {
|
|
this.themes = [
|
|
{
|
|
name: "light",
|
|
label: ("Frappe Light"),
|
|
info: ("Light Theme"),
|
|
},
|
|
{
|
|
name: "dark",
|
|
label: "Timeless Night",
|
|
info: "Dark Theme",
|
|
},
|
|
{
|
|
name: "modern_ui_theme",
|
|
label: "Modern Desk UI",
|
|
info: "The theme I copied from github"
|
|
},
|
|
{
|
|
name: "automatic",
|
|
label: "Automatic",
|
|
info: "Uses system's theme to switch between light and dark mode",
|
|
}
|
|
];
|
|
|
|
resolve(this.themes);
|
|
});
|
|
}
|
|
} |