From 4e5a52a64bed4d9b6bc29c69fcc8f90495a9ffe4 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 + "/", "");