web: fix tabs detecting all slot elements
This commit is contained in:
		| @ -28,7 +28,7 @@ export class Tabs extends LitElement { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     render(): TemplateResult { |     render(): TemplateResult { | ||||||
|         const pages = Array.from(this.querySelectorAll("[slot]")); |         const pages = Array.from(this.querySelectorAll("[slot^='page-']")); | ||||||
|         if (!this.currentPage) { |         if (!this.currentPage) { | ||||||
|             if (pages.length < 1) { |             if (pages.length < 1) { | ||||||
|                 return html`<h1>${gettext("no tabs defined")}</h1>`; |                 return html`<h1>${gettext("no tabs defined")}</h1>`; | ||||||
|  | |||||||
| @ -34,8 +34,8 @@ export class LibraryApplication extends LitElement { | |||||||
|         return html` <a href="${this.application.launch_url}" class="pf-c-card pf-m-hoverable pf-m-compact"> |         return html` <a href="${this.application.launch_url}" class="pf-c-card pf-m-hoverable pf-m-compact"> | ||||||
|             <div class="pf-c-card__header"> |             <div class="pf-c-card__header"> | ||||||
|                 ${this.application.meta_icon |                 ${this.application.meta_icon | ||||||
|         ? html`<img class="app-icon pf-c-avatar" src="${ifDefined(this.application.meta_icon)}" alt="Application Icon"/>` |                     ? html`<img class="app-icon pf-c-avatar" src="${ifDefined(this.application.meta_icon)}" alt="Application Icon"/>` | ||||||
|         : html`<i class="pf-icon pf-icon-arrow"></i>`} |                     : html`<i class="pf-icon pf-icon-arrow"></i>`} | ||||||
|             </div> |             </div> | ||||||
|             <div class="pf-c-card__title"> |             <div class="pf-c-card__title"> | ||||||
|                 <p id="card-1-check-label">${this.application.name}</p> |                 <p id="card-1-check-label">${this.application.name}</p> | ||||||
| @ -92,8 +92,8 @@ export class LibraryPage extends LitElement { | |||||||
|             </section> |             </section> | ||||||
|             <section class="pf-c-page__main-section"> |             <section class="pf-c-page__main-section"> | ||||||
|             ${loading(this.apps, html`${(this.apps?.results.length || 0) > 0 ? |             ${loading(this.apps, html`${(this.apps?.results.length || 0) > 0 ? | ||||||
|         this.renderApps() : |                 this.renderApps() : | ||||||
|         this.renderEmptyState()}`)} |                 this.renderEmptyState()}`)} | ||||||
|             </section> |             </section> | ||||||
|         </main>`; |         </main>`; | ||||||
|     } |     } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer