From 6495d6c50a0f0b0543865270ea62b124fc867e8f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 16 Jan 2021 23:04:08 +0100 Subject: [PATCH] web: fix tabs detecting all slot elements --- web/src/elements/Tabs.ts | 2 +- web/src/pages/LibraryPage.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/src/elements/Tabs.ts b/web/src/elements/Tabs.ts index da4bbe612..aeffb18c5 100644 --- a/web/src/elements/Tabs.ts +++ b/web/src/elements/Tabs.ts @@ -28,7 +28,7 @@ export class Tabs extends LitElement { } render(): TemplateResult { - const pages = Array.from(this.querySelectorAll("[slot]")); + const pages = Array.from(this.querySelectorAll("[slot^='page-']")); if (!this.currentPage) { if (pages.length < 1) { return html`

${gettext("no tabs defined")}

`; diff --git a/web/src/pages/LibraryPage.ts b/web/src/pages/LibraryPage.ts index ecc7d3bc7..db82dd814 100644 --- a/web/src/pages/LibraryPage.ts +++ b/web/src/pages/LibraryPage.ts @@ -34,8 +34,8 @@ export class LibraryApplication extends LitElement { return html`
${this.application.meta_icon - ? html`Application Icon` - : html``} + ? html`Application Icon` + : html``}

${this.application.name}

@@ -92,8 +92,8 @@ export class LibraryPage extends LitElement {
${loading(this.apps, html`${(this.apps?.results.length || 0) > 0 ? - this.renderApps() : - this.renderEmptyState()}`)} + this.renderApps() : + this.renderEmptyState()}`)}
`; }