Merge pull request #37202 from iamejaaz/sidebar-menu-position

refactor(ui): reposition menu for improved layout
This commit is contained in:
Ejaaz Khan 2026-02-18 20:34:53 +05:30 committed by GitHub
commit ec2dbdd491
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,14 @@ frappe.ui.SidebarHeader = class SidebarHeader {
const me = this;
this.sibling_workspaces = this.fetch_related_icons();
this.dropdown_items = [
{
name: "desktop",
label: __("Desktop"),
icon: "layout-grid",
onClick: function (el) {
frappe.set_route("/desk");
},
},
{
name: "workspaces",
label: "Workspaces",
@ -16,14 +24,6 @@ frappe.ui.SidebarHeader = class SidebarHeader {
},
items: this.sibling_workspaces,
},
{
name: "desktop",
label: __("Desktop"),
icon: "layout-grid",
onClick: function (el) {
frappe.set_route("/desk");
},
},
{
name: "edit-sidebar",
label: __("Edit Sidebar"),
@ -47,12 +47,6 @@ frappe.ui.SidebarHeader = class SidebarHeader {
if (frappe.boot.desk_settings.notifications) {
let is_dark = frappe.ui.get_current_theme() === "dark";
this.dropdown_items.push(
{
name: "help",
label: "Help",
icon: "info",
items: this.get_help_siblings(),
},
{
label: "Session Defaults",
action: "frappe.ui.toolbar.setup_session_defaults()",
@ -76,6 +70,12 @@ frappe.ui.SidebarHeader = class SidebarHeader {
action: "new frappe.ui.ThemeSwitcher().show()",
is_standard: 1,
icon: is_dark ? "sun" : "moon",
},
{
name: "help",
label: "Help",
icon: "info",
items: this.get_help_siblings(),
}
);
}