From 25e4c114e83add4457d1d82cdd3ef9ca32a13c56 Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Sat, 2 Dec 2023 15:50:56 -0500 Subject: [PATCH] Updated templates to new Angular control flow --- src/app/app.component.html | 156 ++- .../archive-viewer.component.html | 215 +-- .../concurrent-stream.component.html | 16 +- .../custom-playlists.component.html | 25 +- .../downloads/downloads.component.html | 193 +-- src/app/components/login/login.component.html | 93 +- .../logs-viewer/logs-viewer.component.html | 67 +- .../manage-role/manage-role.component.html | 26 +- .../manage-user/manage-user.component.html | 44 +- .../modify-users/modify-users.component.html | 151 +-- .../notifications-list.component.html | 66 +- .../notifications.component.html | 22 +- .../recent-videos.component.html | 221 ++-- .../see-more/see-more.component.html | 19 +- .../skip-ad-button.component.html | 4 +- .../sort-property.component.html | 26 +- .../task-settings.component.html | 46 +- src/app/components/tasks/tasks.component.html | 214 +-- .../twitch-chat/twitch-chat.component.html | 23 +- .../unified-file-card.component.html | 166 ++- .../create-playlist.component.html | 47 +- .../about-dialog/about-dialog.component.html | 82 +- .../arg-modifier-dialog.component.html | 174 +-- .../confirm-dialog.component.html | 23 +- .../cookies-uploader-dialog.component.html | 70 +- .../edit-category-dialog.component.html | 117 +- .../edit-subscription-dialog.component.html | 138 +- .../generate-rss-url.component.html | 123 +- .../restore-db-dialog.component.html | 44 +- .../set-default-admin-dialog.component.html | 28 +- .../share-media-dialog.component.html | 47 +- .../subscribe-dialog.component.html | 162 +-- .../subscription-info-dialog.component.html | 46 +- .../update-progress-dialog.component.html | 32 +- ...update-task-schedule-dialog.component.html | 99 +- .../user-profile-dialog.component.html | 118 +- .../video-info-dialog.component.html | 147 ++- .../input-dialog/input-dialog.component.html | 8 +- src/app/main/main.component.html | 437 +++--- src/app/player/player.component.html | 144 +- src/app/settings/settings.component.html | 1169 +++++++++-------- .../subscription/subscription.component.html | 61 +- .../subscriptions.component.html | 106 +- src/app/updater/updater.component.html | 38 +- 44 files changed, 2790 insertions(+), 2463 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 6ec00c9..61ee690 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,67 +1,95 @@
-
- -
-
-
-
- - -
-
-
-
- - - - - - - - - - - -
-
+
+ +
+
+
+
+ @if (router.url.split(';')[0] !== '/player') { + + } @else { + + } +
- -
-
- - - - Home - Login - Subscriptions - Downloads - Tasks - - - Settings - - - - {{subscription.name}} - - - - - - - -
+
+
+ @if (postsService.config?.Extra.enable_notifications) { + + } + + + + + + + @if (!postsService.config?.Advanced.multi_user_mode || postsService.isLoggedIn) { + + } + @if (allowThemeChange) { + + } + + +
+
+
+ +
+
+ + + + @if (postsService.config && (!postsService.config.Advanced.multi_user_mode || postsService.isLoggedIn)) { + Home + } + @if (postsService.config && postsService.config.Advanced.multi_user_mode && !postsService.isLoggedIn) { + Login + } + @if (postsService.config && allowSubscriptions && postsService.hasPermission('subscriptions')) { + Subscriptions + } + @if (postsService.config && enableDownloadsManager && postsService.hasPermission('downloads_manager')) { + Downloads + } + @if (postsService.config && postsService.hasPermission('tasks_manager')) { + Tasks + } + @if (postsService.config && postsService.hasPermission('settings')) { + + Settings + } + @if (postsService.config && allowSubscriptions && postsService.subscriptions && postsService.hasPermission('subscriptions')) { + @if (postsService.subscriptions.length > 0) { + + } + @for (subscription of postsService.subscriptions; track subscription) { + {{subscription.name}} + } + } + + + + + + +
\ No newline at end of file diff --git a/src/app/components/archive-viewer/archive-viewer.component.html b/src/app/components/archive-viewer/archive-viewer.component.html index a25f151..29401f9 100644 --- a/src/app/components/archive-viewer/archive-viewer.component.html +++ b/src/app/components/archive-viewer/archive-viewer.component.html @@ -3,75 +3,68 @@ Filter -
-
- - - - - - - - - - - - - {{(row.type === 'audio') ? 'audiotrack' : 'movie'}} - - - - - - Date - {{element.timestamp*1000 | date: 'short'}} - - - - - Title - - - {{element.title}} - - - - - - - ID - - - {{element.id}} - - - - - - - Extractor - - - {{element.extractor}} - - - - - - - -
+
+ + + + + + + + + + + + {{(row.type === 'audio') ? 'audiotrack' : 'movie'}} + + + + + Date + {{element.timestamp*1000 | date: 'short'}} + + + + Title + + + {{element.title}} + + + + + + ID + + + {{element.id}} + + + + + + Extractor + + + {{element.extractor}} + + + + + + +
- -
-

Archives empty

-
- +@if ((!archives || archives.length === 0)) { +
+

Archives empty

+
+}
@@ -82,7 +75,9 @@ Subscription None - {{sub.name}} + @for (sub of postsService.subscriptions; track sub) { + {{sub.name}} + } @@ -95,49 +90,55 @@
-
- -
-
- Drag and Drop -
-
- -
-
-
+ +
+
+ Drag and Drop +
+
+ +
+
+
-
- - - - - - -
- {{ item.relativePath }} - -
- - Subscription - - None - {{sub.name}} - - - - File type - - Video - Audio - - - -
-
+ + @for (item of files; track item; let i = $index) { + + + {{ item.relativePath }} + + +
+ + Subscription + + None + @for (sub of postsService.subscriptions; track sub) { + {{sub.name}} + } + + + + File type + + Video + Audio + + + +
+ + + } + +
diff --git a/src/app/components/concurrent-stream/concurrent-stream.component.html b/src/app/components/concurrent-stream/concurrent-stream.component.html index 414c4ac..ffcea14 100644 --- a/src/app/components/concurrent-stream/concurrent-stream.component.html +++ b/src/app/components/concurrent-stream/concurrent-stream.component.html @@ -1,6 +1,14 @@
- - - - + @if (!watch_together_clicked) { + + } @else { + @if (!started) { + @if (server_already_exists) { + + } @else if (server_mode) { + + } + } + + }
\ No newline at end of file diff --git a/src/app/components/custom-playlists/custom-playlists.component.html b/src/app/components/custom-playlists/custom-playlists.component.html index 4a80cd2..2b8a721 100644 --- a/src/app/components/custom-playlists/custom-playlists.component.html +++ b/src/app/components/custom-playlists/custom-playlists.component.html @@ -1,13 +1,18 @@ -
+@if (playlists) { +
-
-
- -
-
+
+ @for (playlist of playlists; track playlist; let i = $index) { +
+ +
+ } @empty { +
+ No playlists available. Create one from your downloading files by clicking the blue plus button. +
+ } +
-
-
- No playlists available. Create one from your downloading files by clicking the blue plus button. -
+
+}
\ No newline at end of file diff --git a/src/app/components/downloads/downloads.component.html b/src/app/components/downloads/downloads.component.html index 5c11a12..7005015 100644 --- a/src/app/components/downloads/downloads.component.html +++ b/src/app/components/downloads/downloads.component.html @@ -1,97 +1,102 @@
-
- - - - - Date - {{element.timestamp_start | date: 'short'}} - - - - - Title - - - {{element.title}} +
+ + + + Date + {{element.timestamp_start | date: 'short'}} + + + + Title + + + {{element.title}} + + + + + + Subscription + + @if (element.sub_name) { + {{element.sub_name}} + } @else { + N/A + } + + + + + Progress + + @if (!element.error) { + @if (element.step_index !== 2) { + {{STEP_INDEX_TO_LABEL[element.step_index]}} + } @else { + @if (element.percent_complete) { + {{+(element.percent_complete) > 100 ? '100' : element.percent_complete}}% + } @else { + N/A + } + } + } @else { + Error + } + + + + + Actions + + @if (!minimizeButtons) { +
+ @for (downloadAction of downloadActions; track downloadAction) { + + @if (downloadAction.loading && downloadAction.loading(element)) { + + } + @if (downloadAction.show(element)) { + + } - - - - - - Subscription - - - {{element.sub_name}} - - - N/A - - - - - - - Progress - - - {{STEP_INDEX_TO_LABEL[element.step_index]}} - - - - {{+(element.percent_complete) > 100 ? '100' : element.percent_complete}}% - - - N/A - - - Error - - - - - - Actions - -
- - - - - - -
-
- - - - - - -
-
-
- - - - - - - -
-
- - - -
+ } +
+ } @else { +
+ + + @for (downloadAction of downloadActions; track downloadAction) { + @if (downloadAction.show(element)) { + + } + } + +
+ } +
+
+ + +
+ + +
+ @if (!uids) { +
+ + + +
+ }
- -
-

No downloads available!

-
\ No newline at end of file +@if ((!downloads || downloads.length === 0) && downloads_retrieved && !uids) { +
+

No downloads available!

+
+} \ No newline at end of file diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html index 0569a8a..bd7cbe6 100644 --- a/src/app/components/login/login.component.html +++ b/src/app/components/login/login.component.html @@ -1,46 +1,55 @@