diff --git a/src/app/player/components/video-player/sidebar/sidebar.component.html b/src/app/player/components/video-player/sidebar/sidebar.component.html
index c9d209d97..ee13d5ec0 100644
--- a/src/app/player/components/video-player/sidebar/sidebar.component.html
+++ b/src/app/player/components/video-player/sidebar/sidebar.component.html
@@ -1,33 +1,35 @@
-
-
-
-
-
-
- @if (sidebarView === 'CHANNELS') {
- {{ playlistTitle$ | async }}
- } @else {
- {{ 'HOME.PLAYLISTS.MY_PLAYLISTS' | translate }}
- }
-
-
- {{
- sidebarView === 'CHANNELS'
- ? channels?.length +
- ' ' +
- ('HOME.PLAYLISTS.CHANNELS' | translate)
- : ('HOME.PLAYLISTS.MY_PLAYLISTS_SUBTITLE'
- | translate)
- }}
-
-
-
-
+
+
+
+
+
+ @if (sidebarView === 'CHANNELS') {
+ {{ playlistTitle$ | async }}
+ } @else {
+ {{ 'HOME.PLAYLISTS.MY_PLAYLISTS' | translate }}
+ }
+
+
+ {{
+ sidebarView === 'CHANNELS'
+ ? channels()?.length +
+ ' ' +
+ ('HOME.PLAYLISTS.CHANNELS' | translate)
+ : ('HOME.PLAYLISTS.MY_PLAYLISTS_SUBTITLE' | translate)
+ }}
+
+
+
+
+ @if (sidebarView === 'CHANNELS') {
-
+ }
-
@if (sidebarView === 'CHANNELS') {
-
+
} @else {
}
diff --git a/src/app/player/components/video-player/sidebar/sidebar.component.scss b/src/app/player/components/video-player/sidebar/sidebar.component.scss
index da7946223..645e92e9e 100644
--- a/src/app/player/components/video-player/sidebar/sidebar.component.scss
+++ b/src/app/player/components/video-player/sidebar/sidebar.component.scss
@@ -1,32 +1,28 @@
-#playlists-navigation {
+.current-playlist {
+ display: flex;
+ align-items: center;
+ padding: 8px;
+ justify-content: space-between;
- .current-playlist {
+ .left {
display: flex;
- align-items: center;
- padding: 8px;
- justify-content: space-between;
+ gap: 5px;
+ }
+}
- .left {
- display: flex;
- gap: 5px;
- }
+.playlist-info {
+ flex: 1;
+ max-width: 300px;
+
+ .name {
+ font-size: 1.1em;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
- .playlist-info {
- flex: 1;
- max-width: 300px;
-
-
- .name {
- font-size: 1.1em;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- .channels-count {
- font-size: 0.8em;
- }
+ .channels-count {
+ font-size: 0.8em;
}
}
@@ -36,10 +32,6 @@
width: 100%;
}
-.electron {
- height: calc(100vh - 85px) !important;
-}
-
@media only screen and (max-width: 480px) {
.playlist-info {
.name {
diff --git a/src/app/player/components/video-player/sidebar/sidebar.component.ts b/src/app/player/components/video-player/sidebar/sidebar.component.ts
index 42df083c3..99d517a1a 100644
--- a/src/app/player/components/video-player/sidebar/sidebar.component.ts
+++ b/src/app/player/components/video-player/sidebar/sidebar.component.ts
@@ -1,15 +1,13 @@
-import { AsyncPipe, NgIf } from '@angular/common';
-import { Component, Input } from '@angular/core';
-import { MatButtonModule } from '@angular/material/button';
-import { MatDividerModule } from '@angular/material/divider';
-import { MatIconModule } from '@angular/material/icon';
-import { MatTooltipModule } from '@angular/material/tooltip';
+import { AsyncPipe } from '@angular/common';
+import { Component, inject, input } from '@angular/core';
+import { MatIconButton } from '@angular/material/button';
+import { MatIcon } from '@angular/material/icon';
+import { MatTooltip } from '@angular/material/tooltip';
import { Router, RouterLink } from '@angular/router';
import { Store } from '@ngrx/store';
import { TranslatePipe } from '@ngx-translate/core';
import { Channel } from '../../../../../../shared/channel.interface';
import { RecentPlaylistsComponent } from '../../../../home/recent-playlists/recent-playlists.component';
-import { DataService } from '../../../../services/data.service';
import * as PlaylistActions from '../../../../state/actions';
import { selectPlaylistTitle } from '../../../../state/selectors';
import { SidebarView } from '../video-player.component';
@@ -21,32 +19,24 @@ import { ChannelListContainerComponent } from './../../channel-list-container/ch
imports: [
AsyncPipe,
ChannelListContainerComponent,
- MatButtonModule,
- MatDividerModule,
- MatIconModule,
- MatTooltipModule,
- NgIf,
+ MatIcon,
+ MatIconButton,
+ MatTooltip,
RecentPlaylistsComponent,
- TranslatePipe,
RouterLink,
+ TranslatePipe,
],
})
export class SidebarComponent {
- @Input() channels: Channel[] = [];
+ readonly channels = input
([]);
- isElectron = this.dataService.isElectron;
-
- playlistTitle$ = this.store.select(selectPlaylistTitle);
+ private readonly router = inject(Router);
+ private readonly store = inject(Store);
+ readonly playlistTitle$ = this.store.select(selectPlaylistTitle);
sidebarView: SidebarView = 'CHANNELS';
- constructor(
- public dataService: DataService,
- private router: Router,
- private store: Store
- ) {}
-
- goBack(): void {
+ goBack() {
if (this.sidebarView === 'PLAYLISTS') {
this.store.dispatch(PlaylistActions.resetActiveChannel());
this.router.navigate(['/']);