fix: remove dead code regarding default workspace
This commit is contained in:
parent
767099268a
commit
7a73a23e4a
2 changed files with 1 additions and 23 deletions
|
|
@ -479,23 +479,6 @@ frappe.router = {
|
|||
// 3. Public home
|
||||
// 4. First workspace in list of current app
|
||||
// 5. First workspace in list
|
||||
let private_home = `home-${frappe.user.name.toLowerCase()}`;
|
||||
let default_workspace = frappe.router.slug(frappe.boot.user.default_workspace?.name || "");
|
||||
|
||||
let workspace =
|
||||
frappe.workspaces[default_workspace] ||
|
||||
frappe.workspaces[private_home] ||
|
||||
frappe.workspaces["home"] ||
|
||||
Object.values(frappe.workspace_map).find((w) => w.app === frappe.current_app) ||
|
||||
Object.values(frappe.workspaces)[0];
|
||||
|
||||
if (workspace) {
|
||||
return (
|
||||
"/desk/" +
|
||||
(workspace.public ? "" : "private/") +
|
||||
frappe.router.slug(workspace.name)
|
||||
);
|
||||
}
|
||||
|
||||
return "/desk";
|
||||
},
|
||||
|
|
|
|||
|
|
@ -137,12 +137,7 @@ frappe.views.Workspace = class Workspace {
|
|||
get_page_to_show() {
|
||||
let default_page;
|
||||
|
||||
if (frappe.boot.user.default_workspace) {
|
||||
default_page = {
|
||||
name: frappe.boot.user.default_workspace.name,
|
||||
public: frappe.boot.user.default_workspace.public,
|
||||
};
|
||||
} else if (
|
||||
if (
|
||||
localStorage.current_page &&
|
||||
this.workspaces.filter((page) => page.name == localStorage.current_page).length != 0
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue