Merge pull request #35847 from sokumon/desktop-fixes
This commit is contained in:
commit
b36e131df0
6 changed files with 5 additions and 100 deletions
|
|
@ -161,9 +161,6 @@ def load_desktop_data(bootinfo):
|
|||
from frappe.desk.desktop import get_workspace_sidebar_items
|
||||
|
||||
bootinfo.workspaces = get_workspace_sidebar_items()
|
||||
bootinfo.show_app_icons_as_folder = frappe.db.get_single_value(
|
||||
"Desktop Settings", "show_app_icons_as_folder"
|
||||
)
|
||||
bootinfo.workspace_sidebar_item = get_sidebar_items()
|
||||
allowed_pages = [d.name for d in bootinfo.workspaces.get("pages")]
|
||||
bootinfo.module_wise_workspaces = get_controller("Workspace").get_module_wise_workspaces()
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"app": "frappe",
|
||||
"charts": [
|
||||
{
|
||||
"chart_name": "Background Job Activity",
|
||||
"label": "Background Job Activity"
|
||||
},
|
||||
{
|
||||
"chart_name": "Notifications By Type",
|
||||
"label": "Notification Summary"
|
||||
}
|
||||
],
|
||||
"content": "[{\"id\":\"-bxX6Dwxxy\",\"type\":\"chart\",\"data\":{\"chart_name\":\"Background Job Activity\",\"col\":12}},{\"id\":\"_U6-GCce9y\",\"type\":\"number_card\",\"data\":{\"number_card_name\":\"Today's Error Count\",\"col\":4}},{\"id\":\"O8uXg3zzF1\",\"type\":\"number_card\",\"data\":{\"number_card_name\":\"Scheduled Jobs\",\"col\":4}},{\"id\":\"i8x_VBbG5v\",\"type\":\"number_card\",\"data\":{\"number_card_name\":\"Active Workers\",\"col\":4}},{\"id\":\"gccD2r7Ut3\",\"type\":\"chart\",\"data\":{\"chart_name\":\"Notification Summary\",\"col\":12}}]",
|
||||
"creation": "2025-09-08 11:33:57.533875",
|
||||
"custom_blocks": [],
|
||||
"docstatus": 0,
|
||||
"doctype": "Workspace",
|
||||
"for_user": "",
|
||||
"hide_custom": 0,
|
||||
"icon": "monitor-check",
|
||||
"idx": 0,
|
||||
"indicator_color": "green",
|
||||
"is_hidden": 0,
|
||||
"label": "System",
|
||||
"link_type": "DocType",
|
||||
"links": [],
|
||||
"modified": "2026-01-12 00:03:31.031145",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "System",
|
||||
"number_cards": [
|
||||
{
|
||||
"label": "Today's Error Count",
|
||||
"number_card_name": "Error Logs"
|
||||
},
|
||||
{
|
||||
"label": "Scheduled Jobs",
|
||||
"number_card_name": "Scheduled Jobs"
|
||||
},
|
||||
{
|
||||
"label": "Active Workers",
|
||||
"number_card_name": "Active RQ Worker"
|
||||
}
|
||||
],
|
||||
"owner": "Administrator",
|
||||
"parent_page": "",
|
||||
"public": 1,
|
||||
"quick_lists": [],
|
||||
"roles": [],
|
||||
"sequence_id": 27.0,
|
||||
"shortcuts": [],
|
||||
"title": "System",
|
||||
"type": "Workspace"
|
||||
}
|
||||
|
|
@ -5,36 +5,22 @@
|
|||
"doctype": "DocType",
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"icon_style",
|
||||
"navbar_style",
|
||||
"show_app_icons_as_folder"
|
||||
"icon_style"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"default": "Subtle",
|
||||
"default": "Solid",
|
||||
"fieldname": "icon_style",
|
||||
"fieldtype": "Select",
|
||||
"label": "Icon Style",
|
||||
"options": "Subtle\nSolid"
|
||||
},
|
||||
{
|
||||
"fieldname": "navbar_style",
|
||||
"fieldtype": "Select",
|
||||
"label": "Navbar Style",
|
||||
"options": "Awesomebar\nmacOS Launchpad\nBrand Logo\nBrand Logo with Search\nTimeless Launchpad\nApps with Search"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "show_app_icons_as_folder",
|
||||
"fieldtype": "Check",
|
||||
"label": "Show App Icons As Folder"
|
||||
}
|
||||
],
|
||||
"grid_page_length": 50,
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2025-12-12 07:11:57.947973",
|
||||
"modified": "2026-01-12 14:14:52.189474",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Desk",
|
||||
"name": "Desktop Settings",
|
||||
|
|
|
|||
|
|
@ -15,15 +15,6 @@ class DesktopSettings(Document):
|
|||
from frappe.types import DF
|
||||
|
||||
icon_style: DF.Literal["Subtle", "Solid"]
|
||||
navbar_style: DF.Literal[
|
||||
"Awesomebar",
|
||||
"macOS Launchpad",
|
||||
"Brand Logo",
|
||||
"Brand Logo with Search",
|
||||
"Timeless Launchpad",
|
||||
"Apps with Search",
|
||||
]
|
||||
show_app_icons_as_folder: DF.Check
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -785,10 +785,7 @@ class DesktopIcon {
|
|||
}
|
||||
|
||||
render_folder_thumbnail() {
|
||||
let condition =
|
||||
frappe.boot.show_app_icons_as_folder &&
|
||||
this.icon_type == "App" &&
|
||||
this.child_icons.length > 0;
|
||||
let condition = this.icon_type == "App" && this.child_icons.length > 0;
|
||||
if (this.icon_type == "Folder" || condition) {
|
||||
if (!this.folder_wrapper) this.folder_wrapper = this.icon.find(".icon-container");
|
||||
this.folder_wrapper.html("");
|
||||
|
|
|
|||
|
|
@ -6,18 +6,6 @@
|
|||
"header_icon": "monitor-check",
|
||||
"idx": 0,
|
||||
"items": [
|
||||
{
|
||||
"child": 0,
|
||||
"collapsible": 1,
|
||||
"icon": "home",
|
||||
"indent": 0,
|
||||
"keep_closed": 0,
|
||||
"label": "Home",
|
||||
"link_to": "System",
|
||||
"link_type": "Workspace",
|
||||
"show_arrow": 0,
|
||||
"type": "Link"
|
||||
},
|
||||
{
|
||||
"child": 0,
|
||||
"collapsible": 1,
|
||||
|
|
@ -226,7 +214,7 @@
|
|||
"type": "Link"
|
||||
}
|
||||
],
|
||||
"modified": "2026-01-08 14:16:38.658526",
|
||||
"modified": "2026-01-12 14:27:13.391611",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "System",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue