mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 05:36:17 -08:00
refactor: style and code improvements
This commit is contained in:
1 parent
53bcbf7147
commit
55e160da76
12 files changed
+147
-101
No files matched your search
@@ -12,62 +12,60 @@
|
||||
[contentTypeNavigationItems]="navigationContentTypes"
|
||||
/>
|
||||
|
||||
<div class="container">
|
||||
@if (isLoading) {
|
||||
<mat-spinner />
|
||||
} @else {
|
||||
@switch (currentLayout) {
|
||||
@case ('error-view') {
|
||||
<app-playlist-error-view
|
||||
[title]="this.errorViewInfo.title | translate"
|
||||
[description]="this.errorViewInfo.message | translate"
|
||||
@if (isLoading) {
|
||||
<mat-spinner />
|
||||
} @else {
|
||||
@switch (currentLayout) {
|
||||
@case ('error-view') {
|
||||
<app-playlist-error-view
|
||||
[title]="this.errorViewInfo.title | translate"
|
||||
[description]="this.errorViewInfo.message | translate"
|
||||
/>
|
||||
}
|
||||
@case ('category') {
|
||||
<app-category-view
|
||||
(categoryClicked)="categoryClicked($event)"
|
||||
[items]="items"
|
||||
/>
|
||||
}
|
||||
@case ('category_content') {
|
||||
@if (selectedContentType === 'itv') {
|
||||
<app-live-stream-layout
|
||||
[channels]="items"
|
||||
[player]="player"
|
||||
[streamUrl]="streamUrl"
|
||||
[epgItems]="epgItems"
|
||||
(itemClicked)="itemClicked($event)"
|
||||
/>
|
||||
}
|
||||
@case ('category') {
|
||||
<app-category-view
|
||||
(categoryClicked)="categoryClicked($event)"
|
||||
[items]="items"
|
||||
/>
|
||||
}
|
||||
@case ('category_content') {
|
||||
@if (selectedContentType === 'itv') {
|
||||
<app-live-stream-layout
|
||||
[channels]="items"
|
||||
[player]="player"
|
||||
[streamUrl]="streamUrl"
|
||||
[epgItems]="epgItems"
|
||||
(itemClicked)="itemClicked($event)"
|
||||
/>
|
||||
} @else {
|
||||
<app-category-content-view
|
||||
[items]="items"
|
||||
(itemClicked)="itemClicked($event)"
|
||||
/>
|
||||
}
|
||||
}
|
||||
@case ('vod-details') {
|
||||
<app-vod-details
|
||||
[item]="vodDetails"
|
||||
(playClicked)="playVod($event)"
|
||||
(addToFavoritesClicked)="addToFavorites($event)"
|
||||
(removeFromFavoritesClicked)="removeFromFavorites($event)"
|
||||
/>
|
||||
}
|
||||
@case ('serie-details') {
|
||||
<app-serial-details
|
||||
[item]="vodDetails"
|
||||
[seriesId]="contentId"
|
||||
(playClicked)="playEpisode($event)"
|
||||
(addToFavoritesClicked)="addToFavorites($event)"
|
||||
(removeFromFavoritesClicked)="removeFromFavorites($event)"
|
||||
/>
|
||||
}
|
||||
@case ('favorites') {
|
||||
} @else {
|
||||
<app-category-content-view
|
||||
[items]="favorites$ | async"
|
||||
[items]="items"
|
||||
(itemClicked)="itemClicked($event)"
|
||||
/>
|
||||
}
|
||||
}
|
||||
@case ('vod-details') {
|
||||
<app-vod-details
|
||||
[item]="vodDetails"
|
||||
(playClicked)="playVod($event)"
|
||||
(addToFavoritesClicked)="addToFavorites($event)"
|
||||
(removeFromFavoritesClicked)="removeFromFavorites($event)"
|
||||
/>
|
||||
}
|
||||
@case ('serie-details') {
|
||||
<app-serial-details
|
||||
[item]="vodDetails"
|
||||
[seriesId]="contentId"
|
||||
(playClicked)="playEpisode($event)"
|
||||
(addToFavoritesClicked)="addToFavorites($event)"
|
||||
(removeFromFavoritesClicked)="removeFromFavorites($event)"
|
||||
/>
|
||||
}
|
||||
@case ('favorites') {
|
||||
<app-category-content-view
|
||||
[items]="favorites$ | async"
|
||||
(itemClicked)="itemClicked($event)"
|
||||
/>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
Reference in new issue
Block a user