fix(ux): show new icon
This commit is contained in:
parent
0587320d78
commit
5716365661
3 changed files with 6 additions and 2 deletions
|
|
@ -340,4 +340,4 @@ def add_workspace_to_desktop(workspace):
|
|||
new_icon.link_to = workspace
|
||||
new_icon.link_type = "Workspace Sidebar"
|
||||
new_icon.insert()
|
||||
return {"message": "Desktop Icon added successfully"}
|
||||
return {"icon": new_icon.as_dict()}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ frappe.ui.form.on("Workspace", {
|
|||
workspace: frm.doc.name,
|
||||
},
|
||||
callback: function (r) {
|
||||
if (r.message.status) {
|
||||
if (r.message) {
|
||||
frappe.boot.desktop_icons.push(r.message.icon);
|
||||
frappe.toast({
|
||||
message: __("Workspace added to desktop"),
|
||||
indicator: "green",
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ frappe.pages["desktop"].on_page_load = function (wrapper) {
|
|||
// setup();
|
||||
};
|
||||
|
||||
frappe.pages["desktop"].on_page_show = function (wrapper) {
|
||||
frappe.pages["desktop"].desktop_page.update();
|
||||
};
|
||||
function get_workspaces_from_app_name(app_name) {
|
||||
const app = frappe.boot.app_data.filter((a) => {
|
||||
return a.app_title === app_name;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue