feat: show theme toggle option on desktop view
This commit is contained in:
parent
734b0c90b1
commit
3d0fe8d735
1 changed files with 8 additions and 0 deletions
|
|
@ -249,12 +249,20 @@ class DesktopPage {
|
|||
}
|
||||
setup_avatar() {
|
||||
$(".desktop-avatar").html(frappe.avatar(frappe.session.user, "avatar-medium"));
|
||||
let is_dark = document.documentElement.getAttribute("data-theme") === "dark";
|
||||
let menu_items = [
|
||||
{
|
||||
icon: "edit",
|
||||
label: "Edit Profile",
|
||||
url: `/update-profile/${frappe.session.user}`,
|
||||
},
|
||||
{
|
||||
icon: is_dark ? "sun" : "moon",
|
||||
label: "Toggle Theme",
|
||||
onClick: function () {
|
||||
new frappe.ui.ThemeSwitcher().show();
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: "lock",
|
||||
label: "Reset Password",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue