From 53bcbf71473810e8127be083b3b7e4a869db0205 Mon Sep 17 00:00:00 2001 From: 4gray Date: Mon, 24 Jun 2024 16:23:56 +0200 Subject: [PATCH] refactor: extend playlist-error-view cmp --- .../playlist-error-view.component.html | 40 +- .../playlist-error-view.component.ts | 4 +- src/assets/images/empty-category.svg | 569 ++++++++++++++++++ 3 files changed, 597 insertions(+), 16 deletions(-) create mode 100644 src/assets/images/empty-category.svg 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 0857585b5..b3c30b54b 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 @@ -1,21 +1,31 @@
- + @if (viewType === 'ERROR') { + + } @else if (viewType === 'EMPTY_CATEGORY') { + + }

{{ title }}

{{ description }}
-
- - - -
+ + @if (showActionButtons) { +
+ + + +
+ }
diff --git a/src/app/xtream/playlist-error-view/playlist-error-view.component.ts b/src/app/xtream/playlist-error-view/playlist-error-view.component.ts index c706a3740..6f0d8df98 100644 --- a/src/app/xtream/playlist-error-view/playlist-error-view.component.ts +++ b/src/app/xtream/playlist-error-view/playlist-error-view.component.ts @@ -26,8 +26,10 @@ export class PlaylistErrorViewComponent { currentPlaylist = this.store.selectSignal(selectCurrentPlaylist); - @Input() title: string; @Input() description: string; + @Input() showActionButtons = true; + @Input() title: string; + @Input() viewType: 'ERROR' | 'EMPTY_CATEGORY' = 'ERROR'; openPlaylistDetails() { this.dialog.open(PlaylistInfoComponent, { diff --git a/src/assets/images/empty-category.svg b/src/assets/images/empty-category.svg new file mode 100644 index 000000000..03f5f0266 --- /dev/null +++ b/src/assets/images/empty-category.svg @@ -0,0 +1,569 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +