From c63dbd1a66b1b51f041f3ac85b3f809eab926dba Mon Sep 17 00:00:00 2001 From: Josemi Date: Mon, 25 Nov 2024 14:34:30 +0100 Subject: [PATCH] wc: Undo using dashboard as an app #TASK-7216 #TASK-7100 --- src/webcomponents/commons/layout/layout-sidebar.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/webcomponents/commons/layout/layout-sidebar.js b/src/webcomponents/commons/layout/layout-sidebar.js index daabfc6a0..ce6166781 100644 --- a/src/webcomponents/commons/layout/layout-sidebar.js +++ b/src/webcomponents/commons/layout/layout-sidebar.js @@ -35,7 +35,7 @@ export default class LayoutSidebar extends LitElement { `; } - renderAppButton(app) { + renderButton(app) { const active = this.currentUrl.startsWith(`#${app.id}`); // url always start with the app ID return html` app.id === "dashboard"); - const otherApps = (this.config?.apps || []).filter(app => app.id !== "dashboard"); return html`
- ${dashboardApp ? this.renderAppButton(dashboardApp) : nothing} - ${otherApps.length > 0 ? html` + ${this.renderButton({id: "dashboard", name: "Dashboard", icon: "fa-home"})} + ${this.config?.apps?.length > 0 ? html` ${this.renderSectionSeparator("Apps")} - ${otherApps.map(app => this.renderAppButton(app))} + ${this.config.apps.map(app => this.renderButton(app))} `: nothing}