diff --git a/src/app/player/components/channel-list-container/channel-list-container.component.html b/src/app/player/components/channel-list-container/channel-list-container.component.html index 563f79ae7..ac4539969 100644 --- a/src/app/player/components/channel-list-container/channel-list-container.component.html +++ b/src/app/player/components/channel-list-container/channel-list-container.component.html @@ -57,100 +57,105 @@ - - - - {{ - groups.key || - ('CHANNELS.UNGROUPED' | translate) - | titlecase - }} - ({{ groups.value.length }}) - - - - - - - - + > + + + + + } + } - - - star -
- {{ 'CHANNELS.FAVORITES' | translate }} -
-
- - - - - - {{ - 'CHANNELS.NO_FAVORITES' | translate - }} - - {{ - 'CHANNELS.USE_STAR_TO_FAVORITE' | translate - }} + @let showFavorites = (playlistId$ | async) !== 'GLOBAL_FAVORITES'; + @if (showFavorites) { + + + star +
+ {{ 'CHANNELS.FAVORITES' | translate }} +
-
-
+ @let favorites = favorites$ | async; + @if (favorites) { + + @if (favorites.length > 0) { + + } @else { + {{ + 'CHANNELS.NO_FAVORITES' | translate + }} + + {{ + 'CHANNELS.USE_STAR_TO_FAVORITE' | translate + }} + } + + } + + } } @else { No channels there diff --git a/src/app/player/components/channel-list-container/channel-list-container.component.ts b/src/app/player/components/channel-list-container/channel-list-container.component.ts index bd9540891..12d959cf0 100644 --- a/src/app/player/components/channel-list-container/channel-list-container.component.ts +++ b/src/app/player/components/channel-list-container/channel-list-container.component.ts @@ -1,4 +1,8 @@ -import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'; +import { + CdkDragDrop, + DragDropModule, + moveItemInArray, +} from '@angular/cdk/drag-drop'; import { ScrollingModule } from '@angular/cdk/scrolling'; import { CommonModule, TitleCasePipe } from '@angular/common'; import { @@ -37,8 +41,11 @@ import { ChannelListItemComponent } from './channel-list-item/channel-list-item. templateUrl: './channel-list-container.component.html', styleUrls: ['./channel-list-container.component.scss'], imports: [ - CommonModule, ChannelListItemComponent, + CommonModule, + DragDropModule, + FilterPipe, + FormsModule, MatDividerModule, MatExpansionModule, MatFormFieldModule, @@ -46,11 +53,9 @@ import { ChannelListItemComponent } from './channel-list-item/channel-list-item. MatInputModule, MatListModule, MatTabsModule, - TranslateModule, - TitleCasePipe, - FilterPipe, - FormsModule, ScrollingModule, + TitleCasePipe, + TranslateModule, ], }) export class ChannelListContainerComponent {