From 6175a97ee74195dd5bd2c74737f35940c5c72a55 Mon Sep 17 00:00:00 2001 From: Phillip Kruger Date: Wed, 14 Jun 2023 13:18:43 +1000 Subject: [PATCH] Dev UI: External links should not be a tab in the sub-menu Signed-off-by: Phillip Kruger --- .../main/resources/dev-ui/qwc/qwc-header.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-header.js b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-header.js index 720e89e91b5f2..f2eb0235d4877 100644 --- a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-header.js +++ b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-header.js @@ -237,9 +237,7 @@ export class QwcHeader extends observeState(LitElement) { if(subMenu){ this._rightSideNav = html` ${subMenu.links.map(link => - html` - ${this._renderSubMenuLink(link)} - ` + html`${this._renderTab(subMenu.index, link)}` )} `; }else{ @@ -251,7 +249,19 @@ export class QwcHeader extends observeState(LitElement) { } } - _renderSubMenuLink(link){ + _renderTab(index, link){ + if(!link.page.embed && link.page.includeInSubMenu){ + return html` + ${this._renderSubMenuLink(index, link)} + `; + }else{ + return html` + ${this._renderSubMenuLink(index, link)} + `; + } + } + + _renderSubMenuLink(index, link){ let relativePath = link.page.id.replace(link.page.namespace + "/", "");