{{ title | translate }}
-
-
-
+@if (showSiteName && siteName) {
+ @switch (siteNameMode) {
+ @case ('p') {
+
+
+
+
+ }
+ }
+}
diff --git a/src/core/components/site-picker/core-site-picker.html b/src/core/components/site-picker/core-site-picker.html
index f6ed756fca9..31cfa0a6c2c 100644
--- a/src/core/components/site-picker/core-site-picker.html
+++ b/src/core/components/site-picker/core-site-picker.html
@@ -1,6 +1,10 @@
-
-
-
-
-
+
+
+ @if (displaySiteUrl(site)) {
+
+ }
+
{{site.fullname}}
-
+ @if (siteLabelTemplate) {
+
+ }
-
+ @if (siteItemTemplate) {
+
+ }
diff --git a/src/core/components/swipe-slides/swipe-slides.html b/src/core/components/swipe-slides/swipe-slides.html
index aeeff91a2eb..082ef200dec 100644
--- a/src/core/components/swipe-slides/swipe-slides.html
+++ b/src/core/components/swipe-slides/swipe-slides.html
@@ -1,6 +1,11 @@
-
-
-
-
-
+@if (loaded) {
+
+ @for (item of items; track manager?.getSource().getItemId(item); let index = $index) {
+
+ @if (template) {
+
+ }
+
+ }
+
+}
diff --git a/src/core/components/tabs-outlet/core-tabs-outlet.html b/src/core/components/tabs-outlet/core-tabs-outlet.html
index 547935bf55f..d7a85bfbb45 100644
--- a/src/core/components/tabs-outlet/core-tabs-outlet.html
+++ b/src/core/components/tabs-outlet/core-tabs-outlet.html
@@ -1,37 +1,48 @@
diff --git a/src/core/components/tabs-outlet/tabs-outlet.ts b/src/core/components/tabs-outlet/tabs-outlet.ts
index fd9dce45de7..110d4dfa09f 100644
--- a/src/core/components/tabs-outlet/tabs-outlet.ts
+++ b/src/core/components/tabs-outlet/tabs-outlet.ts
@@ -51,14 +51,20 @@ import { CorePath } from '@singletons/path';
templateUrl: 'core-tabs-outlet.html',
styleUrl: '../tabs/tabs.scss',
})
-export class CoreTabsOutletComponent extends CoreTabsBaseComponent
+export class CoreTabsOutletComponent extends CoreTabsBaseComponent
implements AfterViewInit, OnChanges, OnDestroy {
/**
* Determine tabs layout.
*/
@Input() layout: 'icon-top' | 'icon-start' | 'icon-end' | 'icon-bottom' | 'icon-hide' | 'label-hide' = 'icon-hide';
- @Input() tabs: CoreTabsOutletTab[] = [];
+ @Input({ transform: (tabs?: CoreTabsOutletTab[]): CoreTabsOutletTabWithId[] => {
+ if (!tabs) {
+ return [];
+ }
+
+ return tabs.map((tab) => CoreTabsOutletComponent.formatTab(tab));
+ } }) tabs: CoreTabsOutletTabWithId[] = [];
@ViewChild(IonTabs) protected ionTabs!: IonTabs;
@@ -69,12 +75,16 @@ export class CoreTabsOutletComponent extends CoreTabsBaseComponent): void {
if (changes.tabs) {
- this.tabs.forEach((tab) => {
- this.initTab(tab);
- });
-
this.calculateSlides();
}
@@ -168,7 +174,7 @@ export class CoreTabsOutletComponent extends CoreTabsBaseComponent tab.page === currentPath);
@@ -236,3 +242,5 @@ export type CoreTabsOutletTab = CoreTabBase & {
page: string; // Page to navigate to.
pageParams?: Params; // Page params.
};
+
+export type CoreTabsOutletTabWithId = Omit & { id: string };
diff --git a/src/core/components/tabs/core-tabs.html b/src/core/components/tabs/core-tabs.html
index 9c97fcaca53..b0244895dac 100644
--- a/src/core/components/tabs/core-tabs.html
+++ b/src/core/components/tabs/core-tabs.html
@@ -1,36 +1,50 @@
-
-
+ @if (!hideUntil) {
+
+ } @else {
+
-
+ @if (showPrevButton) {
+
+ }
-
-
-
-
- {{ tab.title | translate}}
-
- {{ tab.badge }}
-
- {{ tab.badgeA11yText | translate: {$a : tab.badge } }}
-
-
-
-
-
-
-
+ @for (tab of tabs; track tab.id) {
+ @if (tab.enabled) {
+
+
+ @if (tab.icon) {
+
+ {{ tab.title | translate}}
+ @if (tab.badge) {
+
+ {{ tab.badge }}
+ @if (tab.badgeA11yText) {
+
+ {{ tab.badgeA11yText | translate: {$a : tab.badge } }}
+
+ }
+
+ }
+
+
+
+ }
+
+ }
+ }
-
-
+ @if (showNextButton) {
+
+ }
+
+ }
diff --git a/src/core/components/tabs/tab.ts b/src/core/components/tabs/tab.ts
index b88dd6169cc..91b81406076 100644
--- a/src/core/components/tabs/tab.ts
+++ b/src/core/components/tabs/tab.ts
@@ -41,7 +41,7 @@ import { CoreTabsComponent } from './tabs';
*/
@Component({
selector: 'core-tab',
- template: ' ',
+ template: '@if (loaded && template) { }',
})
export class CoreTabComponent implements OnInit, OnDestroy, CoreTabBase {
diff --git a/src/core/components/timer/core-timer.html b/src/core/components/timer/core-timer.html
index 705d12f014b..d4f0aad3cc0 100644
--- a/src/core/components/timer/core-timer.html
+++ b/src/core/components/timer/core-timer.html
@@ -1,32 +1,49 @@
-
-
-
-
-
-
+@if (timeLeft !== undefined) {
-
-
-
+ @if (mode !== modeBasic) {
+
+
+
+
+
+ } @else {
+
+
+
+ }
- 0">
+ @if (timeLeft > 0) {
+
- {{ timerText }}
-
- {{ timeLeft | coreSecondsToHMS }}
-
+ @if (timerText) {
+ {{ timerText }}
+ }
+ @if (showTimeLeft) {
+
+ {{ timeLeft | coreSecondsToHMS }}
+
+ }
-
- (
- )
+ @if (hidable) {
+
+ ( @if (showTimeLeft) {
+
+ } @else {
+
+ } )
+
+ }
+ } @else {
+
+ @if (timeUpText) {
+ {{ timeUpText }}
+ } @else {
+ {{ 'core.timesup' | translate }}
+ }
-
-
-
- {{ timeUpText }}
- {{ 'core.timesup' | translate }}
-
+ }
-
+
+}
diff --git a/src/core/components/user-avatar/core-user-avatar.html b/src/core/components/user-avatar/core-user-avatar.html
index 250dba9a92c..8e7b926a9aa 100644
--- a/src/core/components/user-avatar/core-user-avatar.html
+++ b/src/core/components/user-avatar/core-user-avatar.html
@@ -1,24 +1,33 @@
-
-
+@if (avatarUrl) {
-
-
-
-
-
+ @if (linkProfile) {
+
+ } @else {
+
+ }
-
-
-
+} @else if (!avatarUrl && initials) {
+
+ @if (linkProfile) {
+
+
+ } @else {
+
+ }
+
+} @else {
+
-
+}
-
-
+@if (checkOnline && isOnline()) {
+
+
+}
{{site.fullname}}
-