Merge pull request #37202 from iamejaaz/sidebar-menu-position
refactor(ui): reposition menu for improved layout
This commit is contained in:
commit
ec2dbdd491
1 changed files with 14 additions and 14 deletions
|
|
@ -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(),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue