From 8c245e85b5ed521216479e09ce13f1d8b41466cf Mon Sep 17 00:00:00 2001 From: ra939 Date: Sun, 5 Oct 2025 08:51:29 +0000 Subject: [PATCH] Git commit UI changes for recommandation feature --- client/components/AbsSelect.vue | 63 ++++++ client/components/app/Appbar.vue | 28 ++- client/pages/item/_id/index.vue | 263 +++++++++++++--------- client/pages/me/recommendations/inbox.vue | 70 ++++++ client/pages/me/recommendations/sent.vue | 85 +++++++ 5 files changed, 389 insertions(+), 120 deletions(-) create mode 100644 client/components/AbsSelect.vue create mode 100644 client/pages/me/recommendations/inbox.vue create mode 100644 client/pages/me/recommendations/sent.vue diff --git a/client/components/AbsSelect.vue b/client/components/AbsSelect.vue new file mode 100644 index 000000000..5c0e1cd50 --- /dev/null +++ b/client/components/AbsSelect.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/client/components/app/Appbar.vue b/client/components/app/Appbar.vue index f74134041..98d1904e7 100644 --- a/client/components/app/Appbar.vue +++ b/client/components/app/Appbar.vue @@ -42,15 +42,31 @@ + + + + + + + +

{{ $getString('MessageItemsSelected', [numMediaItemsSelected]) }}

@@ -58,17 +74,20 @@ play_arrow {{ $strings.ButtonPlay }} + + + @@ -160,26 +179,22 @@ export default { }, contextMenuItems() { if (!this.userIsAdminOrUp) return [] - const options = [ { text: this.$strings.ButtonQuickMatch, action: 'quick-match' } ] - if (!this.isPodcastLibrary && this.selectedMediaItemsArePlayable) { options.push({ text: this.$strings.ButtonQuickEmbedMetadata, action: 'quick-embed' }) } - options.push({ text: this.$strings.ButtonReScan, action: 'rescan' }) - // The limit of 50 is introduced because of the URL length. Each id has 36 chars, so 36 * 40 = 1440 // + 40 , separators = 1480 chars + base path 280 chars = 1760 chars. This keeps the URL under 2000 chars even with longer domains if (this.selectedMediaItems.length <= 40) { @@ -188,7 +203,6 @@ export default { action: 'download' }) } - return options } }, @@ -259,7 +273,6 @@ export default { }, async playSelectedItems() { this.$store.commit('setProcessingBatch', true) - const libraryItemIds = this.selectedMediaItems.map((i) => i.id) const libraryItems = await this.$axios .$post(`/api/items/batch/get`, { libraryItemIds }) @@ -308,6 +321,7 @@ export default { toggleBatchRead() { this.$store.commit('setProcessingBatch', true) const newIsFinished = !this.selectedIsFinished + const updateProgressPayloads = this.selectedMediaItems.map((item) => { return { libraryItemId: item.id, @@ -339,9 +353,7 @@ export default { callback: (confirmed, hardDelete) => { if (confirmed) { localStorage.setItem('softDeleteDefault', hardDelete ? 0 : 1) - this.$store.commit('setProcessingBatch', true) - this.$axios .$post(`/api/items/batch/delete?hard=${hardDelete ? 1 : 0}`, { libraryItemIds: this.selectedMediaItems.map((i) => i.id) diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index 1d8f0f20b..47c6b7ae6 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -21,6 +21,7 @@
+
@@ -41,7 +42,8 @@

{{ $getString('LabelByAuthor', [podcastAuthor]) }}

- {{ $getString('LabelByAuthor', ['']) }}{{ author.name }} + {{ $getString('LabelByAuthor', ['']) }} + {{ author.name }}

by Unknown

@@ -54,7 +56,6 @@

{{ $getString('MessageEpisodesQueuedForDownload', [episodeDownloadsQueued.length]) }}

- close
@@ -70,9 +71,11 @@

{{ $strings.LabelYourProgress }}: {{ Math.round(progressPercent * 100) }}%

-

{{ $strings.LabelFinished }} {{ $formatDate(userProgressFinishedAt, dateFormat) }}

-

{{ $getString('LabelTimeRemaining', [$elapsedPretty(userTimeRemaining)]) }}

-

{{ $strings.LabelStarted }} {{ $formatDate(userProgressStartedAt, dateFormat) }}

+

{{ $strings.LabelFinished }} {{ fmtDate(userProgressFinishedAt) }}

+

+ {{ $getString('LabelTimeRemaining', [$elapsedPretty(userTimeRemaining)]) }} +

+

{{ $strings.LabelStarted }} {{ fmtDate(userProgressStartedAt) }}

@@ -96,6 +99,12 @@ {{ $strings.ButtonRead }} + + + sell + Recommend + + @@ -124,25 +133,70 @@
- - +
+ + - - - -
+ + + +
+
+
+

Recommend this book

+ +
+ + +
+ +
+ + +

If left empty, this will be a public recommendation.

+
+ +
+ +