diff --git a/libs/portal/downloads/feature/src/lib/downloads.component.ts b/libs/portal/downloads/feature/src/lib/downloads.component.ts
index 84179a700..a9dafaa0f 100644
--- a/libs/portal/downloads/feature/src/lib/downloads.component.ts
+++ b/libs/portal/downloads/feature/src/lib/downloads.component.ts
@@ -22,8 +22,10 @@ import {
DownloadsService,
PlaylistsService,
} from 'services';
+import { EmptyStateComponent } from '@iptvnator/playlist/shared/ui';
import { queryParamSignal } from '@iptvnator/portal/shared/util';
import { createPortalCollectionContext } from '@iptvnator/portal/shared/util';
+import { WORKSPACE_SHELL_ACTIONS } from '@iptvnator/workspace/shell/util';
import {
buildStandardCollectionCategories,
filterCollectionBucket,
@@ -48,6 +50,7 @@ const DOWNLOAD_COLLECTION_LABELS = {
],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
+ EmptyStateComponent,
MatButtonModule,
MatIcon,
MatProgressBarModule,
@@ -64,6 +67,7 @@ export class DownloadsComponent {
private readonly dialogService = inject(DialogService);
private readonly translate = inject(TranslateService);
private readonly snackBar = inject(MatSnackBar);
+ private readonly shellActions = inject(WORKSPACE_SHELL_ACTIONS);
readonly downloadsService = inject(DownloadsService);
readonly downloads = this.downloadsService.downloads;
@@ -81,6 +85,19 @@ export class DownloadsComponent {
readonly playlists = toSignal(this.playlistsService.getAllPlaylists(), {
initialValue: [] as Playlist[],
});
+ readonly hasNoPlaylists = computed(() => this.playlists().length === 0);
+
+ addPlaylist(): void {
+ this.shellActions.openAddPlaylistDialog();
+ }
+
+ goToSources(): void {
+ void this.router.navigate(['/workspace', 'sources']);
+ }
+
+ goToDashboard(): void {
+ void this.router.navigate(['/workspace', 'dashboard']);
+ }
readonly scopedDownloads = computed(() => {
const playlistId = this.playlistId();
diff --git a/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-page.component.html b/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-page.component.html
index b87ddad80..8e8909d89 100644
--- a/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-page.component.html
+++ b/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-page.component.html
@@ -207,26 +207,22 @@
}
@if (!hasLive() && !hasMovies() && !hasSeries()) {
-
-
{{
- workspaceSearchTerm()
- ? 'search_off'
- : mode() === 'favorites'
- ? 'favorite_border'
- : 'history'
- }}
-
- @if (workspaceSearchTerm()) {
+ @if (workspaceSearchTerm()) {
+
+
search_off
+
{{ 'WORKSPACE.GLOBAL_FAVORITES.NO_RESULTS' | translate }}
- } @else {
- {{
- (mode() === 'favorites'
- ? 'PORTALS.NO_FAVORITES'
- : 'PORTALS.NO_RECENT_ITEMS'
- ) | translate
- }}
- }
-
-
+
+
+ } @else {
+
+ }
}
}
diff --git a/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-page.component.ts b/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-page.component.ts
index 0a38fe431..26defbd65 100644
--- a/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-page.component.ts
+++ b/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-page.component.ts
@@ -52,6 +52,7 @@ import {
WorkspaceViewCommandService,
} from '@iptvnator/portal/shared/util';
import { selectAllPlaylistsMeta, selectPlaylistsLoadingFlag } from 'm3u-state';
+import { EmptyStateComponent } from '@iptvnator/playlist/shared/ui';
import { UnifiedLiveTabComponent } from './unified-live-tab.component';
import { UnifiedGridTabComponent } from './unified-grid-tab.component';
import {
@@ -65,6 +66,7 @@ import {
styleUrl: './unified-collection-page.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
+ EmptyStateComponent,
NgTemplateOutlet,
MatButtonToggleModule,
MatIconButton,
@@ -423,6 +425,26 @@ export class UnifiedCollectionPageComponent implements AfterContentInit {
this.selectedContentType.set(value);
}
+ readonly emptyStateIcon = computed(() =>
+ this.mode() === 'favorites' ? 'favorite_border' : 'history_toggle_off'
+ );
+
+ readonly emptyStateTitleKey = computed(() =>
+ this.mode() === 'favorites'
+ ? 'WORKSPACE.GLOBAL_FAVORITES.NO_ITEMS_TITLE'
+ : 'WORKSPACE.GLOBAL_RECENT.NO_ITEMS_TITLE'
+ );
+
+ readonly emptyStateBodyKey = computed(() =>
+ this.mode() === 'favorites'
+ ? 'WORKSPACE.GLOBAL_FAVORITES.NO_ITEMS_BODY'
+ : 'WORKSPACE.GLOBAL_RECENT.NO_ITEMS_BODY'
+ );
+
+ goToDashboard(): void {
+ void this.router.navigate(['/workspace', 'dashboard']);
+ }
+
setFavSortMode(mode: FavoritesChannelSortMode): void {
this.favSortMode.set(mode);
persistFavoritesChannelSortMode(mode);