diff --git a/src/app/stalker/stalker-main-container.component.html b/src/app/stalker/stalker-main-container.component.html index 6608d3c4b..a1e5afaec 100644 --- a/src/app/stalker/stalker-main-container.component.html +++ b/src/app/stalker/stalker-main-container.component.html @@ -4,7 +4,9 @@ (searchTextChanged)="setSearchPhrase($event)" [clientSideSearch]="currentLayout === 'category_content' ? false : true" [searchVisible]=" - currentLayout === 'category' || currentLayout === 'category_content' + (currentLayout === 'category' || + currentLayout === 'category_content') && + items?.length > 0 " [contentTypeNavigationItems]="navigationContentTypes" [contentType]="selectedContentType" @@ -55,16 +57,15 @@ [items]="items" (itemClicked)="itemClicked($event)" /> - + @if (currentLayout === 'category_content' && length && length > 0) { + + } } @case ('vod-details') { 0) {
- - - -
-
- star{{ item.rating || item.rating_imdb }} -
-
- -
{{ item.name }}
-
-
-
- search -
- {{ 'PORTALS.EMPTY_LIST_VIEW.NO_SEARCH_RESULTS' | translate }} -
-
+ @for (item of items | filterBy: searchPhrase() : 'name'; track $index) { + + + @if (item.stream_icon || item.cover || item.logo) { + + } + @if (!item.stream_icon && !item.cover && !item.logo) { +
+ } + @if (item.rating || item.rating_imdb) { +
+ star{{ item.rating || item.rating_imdb }} +
+ } +
+ +
{{ item.name || 'No name' }}
+
+
+ } + @if (!(items | filterBy: searchPhrase() : 'name')?.length) { + + }
} @else { (); portalStore = inject(PortalStore); - searchPhrase = this.portalStore.searchPhrase; - - trackByFn(_index: number, item: XtreamItem) { - return item.stream_id; - } } diff --git a/src/app/xtream/category-view/category-view.component.scss b/src/app/xtream/category-view/category-view.component.scss index ac9e78cff..1c017397c 100644 --- a/src/app/xtream/category-view/category-view.component.scss +++ b/src/app/xtream/category-view/category-view.component.scss @@ -1,40 +1,23 @@ :host { overflow-y: auto; padding: 10px; + display: flex; + flex-wrap: wrap; + gap: 10px; + justify-content: center; } mat-card-content { overflow-wrap: break-word; } -.no-content { - text-align: center; - - .icon { - font-size: 64px; - height: 64px; - width: 64px; - } -} - -.grid { - display: flex; - flex-wrap: wrap; - gap: 10px; - justify-content: center; - - /* padding-bottom: 20px; */ - - .category-item { - cursor: pointer; - width: 200px; - } +.category-item { + cursor: pointer; + width: 200px; } @media (max-width: 800px) { - .grid { - .category-item { - width: 100%; - } + .category-item { + width: 100%; } } diff --git a/src/app/xtream/category-view/category-view.component.ts b/src/app/xtream/category-view/category-view.component.ts index 46beec1d2..4ebd2e609 100644 --- a/src/app/xtream/category-view/category-view.component.ts +++ b/src/app/xtream/category-view/category-view.component.ts @@ -1,6 +1,4 @@ -import { NgFor, NgIf } from '@angular/common'; import { Component, EventEmitter, Input, Output, inject } from '@angular/core'; -import { FormsModule } from '@angular/forms'; import { MatCardModule } from '@angular/material/card'; import { MatIconModule } from '@angular/material/icon'; import { TranslateModule } from '@ngx-translate/core'; @@ -14,37 +12,36 @@ import { PortalStore } from '../portal.store'; standalone: true, template: ` @if (items?.length > 0) { -
+ @for ( + item of items | filterBy: searchPhrase() : 'category_name'; + track $index + ) { - {{ item.category_name || item.name || 'no name' }} + {{ + item.category_name || + item.name || + 'No category name' + }} -
- search -
- {{ - 'PORTALS.EMPTY_LIST_VIEW.NO_SEARCH_RESULTS' - | translate - }} -
-
-
+ [showActionButtons]="false" + [viewType]="'NO_SEARCH_RESULTS'" + /> + } } @else { (); portalStore = inject(PortalStore); - - searchText = this.portalStore.searchPhrase; - - trackByFn(_index: number, item: XtreamCategory) { - return item.category_id; - } + searchPhrase = this.portalStore.searchPhrase; } diff --git a/src/app/xtream/playlist-error-view/playlist-error-view.component.html b/src/app/xtream/playlist-error-view/playlist-error-view.component.html index b3c30b54b..450bbcaa8 100644 --- a/src/app/xtream/playlist-error-view/playlist-error-view.component.html +++ b/src/app/xtream/playlist-error-view/playlist-error-view.component.html @@ -6,6 +6,8 @@ style="max-width: 350px" src="./assets/images/empty-category.svg" /> + } @else if (viewType === 'NO_SEARCH_RESULTS') { + search }

{{ title }}

diff --git a/src/app/xtream/playlist-error-view/playlist-error-view.component.scss b/src/app/xtream/playlist-error-view/playlist-error-view.component.scss index 864b9b81f..a16d4bf5e 100644 --- a/src/app/xtream/playlist-error-view/playlist-error-view.component.scss +++ b/src/app/xtream/playlist-error-view/playlist-error-view.component.scss @@ -11,6 +11,12 @@ } } +.icon { + font-size: 64px; + height: 64px; + width: 64px; +} + ::ng-deep { .dark-theme { .expired-account { diff --git a/src/app/xtream/vod-details/vod-details.component.html b/src/app/xtream/vod-details/vod-details.component.html index 60827b70d..4ea115a87 100644 --- a/src/app/xtream/vod-details/vod-details.component.html +++ b/src/app/xtream/vod-details/vod-details.component.html @@ -9,13 +9,11 @@ " >
- - + @if (item.info?.movie_image) { + + } @else {
-
+ }

{{ item.info.name }}