From 7a47032a96a0e859a01aae43caaaddaa20e9ebe8 Mon Sep 17 00:00:00 2001 From: mfcar Date: Fri, 24 Feb 2023 23:31:16 +0000 Subject: [PATCH 1/4] Improve explicit label and add a AlreadyInYourLibrary indicator --- client/components/cards/BookMatchCard.vue | 6 ++- client/components/cards/LazyBookCard.vue | 9 +++-- .../widgets/AlreadyInLibraryIndicator.vue | 19 +++++++++ .../components/widgets/ExplicitIndicator.vue | 4 +- client/pages/item/_id/index.vue | 5 ++- .../pages/library/_library/podcast/latest.vue | 12 ++++-- .../pages/library/_library/podcast/search.vue | 40 ++++++++++++++++--- client/strings/de.json | 1 + client/strings/en-us.json | 1 + client/strings/es.json | 1 + client/strings/fr.json | 1 + client/strings/hr.json | 1 + client/strings/it.json | 1 + client/strings/pl.json | 1 + client/strings/ru.json | 1 + client/strings/zh-cn.json | 1 + 16 files changed, 89 insertions(+), 15 deletions(-) create mode 100644 client/components/widgets/AlreadyInLibraryIndicator.vue diff --git a/client/components/cards/BookMatchCard.vue b/client/components/cards/BookMatchCard.vue index a7cfb4a7..dd782d30 100644 --- a/client/components/cards/BookMatchCard.vue +++ b/client/components/cards/BookMatchCard.vue @@ -28,7 +28,11 @@
-

{{ book.title }}

+

+
+ {{ book.title }} +
+

by {{ book.author }}

{{ book.genres.join(', ') }}

{{ book.trackCount }} Episodes

diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 7d27dac6..044fb9cf 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -7,9 +7,12 @@
-

- {{ displayTitle }} -

+
+
+ {{ displayTitle }} + +
+

{{ displayLineTwo || ' ' }}

{{ displaySortLine }}

diff --git a/client/components/widgets/AlreadyInLibraryIndicator.vue b/client/components/widgets/AlreadyInLibraryIndicator.vue new file mode 100644 index 00000000..53bc31b3 --- /dev/null +++ b/client/components/widgets/AlreadyInLibraryIndicator.vue @@ -0,0 +1,19 @@ + + + diff --git a/client/components/widgets/ExplicitIndicator.vue b/client/components/widgets/ExplicitIndicator.vue index 833aef7c..3ff68603 100644 --- a/client/components/widgets/ExplicitIndicator.vue +++ b/client/components/widgets/ExplicitIndicator.vue @@ -1,5 +1,7 @@ diff --git a/client/strings/de.json b/client/strings/de.json index 3d99c992..62c22aa3 100644 --- a/client/strings/de.json +++ b/client/strings/de.json @@ -163,6 +163,7 @@ "LabelAddToPlaylistBatch": "Füge {0} Hörbüch(er)/Podcast(s) der Wiedergabeliste hinzu", "LabelAll": "Alle", "LabelAllUsers": "Alle Benutzer", + "LabelAlreadyInYourLibrary": "Already in your library", "LabelAppend": "Anhängen", "LabelAuthor": "Autor", "LabelAuthorFirstLast": "Autor (Vorname Nachname)", diff --git a/client/strings/en-us.json b/client/strings/en-us.json index f2e5e565..d8ab94c2 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -163,6 +163,7 @@ "LabelAddToPlaylistBatch": "Add {0} Items to Playlist", "LabelAll": "All", "LabelAllUsers": "All Users", + "LabelAlreadyInYourLibrary": "Already in your library", "LabelAppend": "Append", "LabelAuthor": "Author", "LabelAuthorFirstLast": "Author (First Last)", diff --git a/client/strings/es.json b/client/strings/es.json index f2e5e565..d8ab94c2 100644 --- a/client/strings/es.json +++ b/client/strings/es.json @@ -163,6 +163,7 @@ "LabelAddToPlaylistBatch": "Add {0} Items to Playlist", "LabelAll": "All", "LabelAllUsers": "All Users", + "LabelAlreadyInYourLibrary": "Already in your library", "LabelAppend": "Append", "LabelAuthor": "Author", "LabelAuthorFirstLast": "Author (First Last)", diff --git a/client/strings/fr.json b/client/strings/fr.json index 7d45f8f1..5f0b1f3c 100644 --- a/client/strings/fr.json +++ b/client/strings/fr.json @@ -163,6 +163,7 @@ "LabelAddToPlaylistBatch": "{0} éléments ajoutés à la liste de lecture", "LabelAll": "Tout", "LabelAllUsers": "Tous les utilisateurs", + "LabelAlreadyInYourLibrary": "Already in your library", "LabelAppend": "Ajouter", "LabelAuthor": "Auteur", "LabelAuthorFirstLast": "Auteur (Prénom Nom)", diff --git a/client/strings/hr.json b/client/strings/hr.json index 19cf4f8b..9b7b4edb 100644 --- a/client/strings/hr.json +++ b/client/strings/hr.json @@ -163,6 +163,7 @@ "LabelAddToPlaylistBatch": "Add {0} Items to Playlist", "LabelAll": "All", "LabelAllUsers": "Svi korisnici", + "LabelAlreadyInYourLibrary": "Already in your library", "LabelAppend": "Append", "LabelAuthor": "Autor", "LabelAuthorFirstLast": "Author (First Last)", diff --git a/client/strings/it.json b/client/strings/it.json index a4e88e4c..9aa3a7b0 100644 --- a/client/strings/it.json +++ b/client/strings/it.json @@ -163,6 +163,7 @@ "LabelAddToPlaylistBatch": "Aggiungi {0} file alla Playlist", "LabelAll": "Tutti", "LabelAllUsers": "Tutti gli Utenti", + "LabelAlreadyInYourLibrary": "Already in your library", "LabelAppend": "Appese", "LabelAuthor": "Autore", "LabelAuthorFirstLast": "Autore (Per Nome)", diff --git a/client/strings/pl.json b/client/strings/pl.json index e6215d3f..50576dd0 100644 --- a/client/strings/pl.json +++ b/client/strings/pl.json @@ -163,6 +163,7 @@ "LabelAddToPlaylistBatch": "Add {0} Items to Playlist", "LabelAll": "All", "LabelAllUsers": "Wszyscy użytkownicy", + "LabelAlreadyInYourLibrary": "Already in your library", "LabelAppend": "Append", "LabelAuthor": "Autor", "LabelAuthorFirstLast": "Autor (Rosnąco)", diff --git a/client/strings/ru.json b/client/strings/ru.json index 9441f453..ca398672 100644 --- a/client/strings/ru.json +++ b/client/strings/ru.json @@ -163,6 +163,7 @@ "LabelAddToPlaylistBatch": "Добавить {0} Элементов в Плейлист", "LabelAll": "Все", "LabelAllUsers": "Все пользователи", + "LabelAlreadyInYourLibrary": "Already in your library", "LabelAppend": "Добавить", "LabelAuthor": "Автор", "LabelAuthorFirstLast": "Автор (Имя Фамилия)", diff --git a/client/strings/zh-cn.json b/client/strings/zh-cn.json index 3d3f48fb..32927a79 100644 --- a/client/strings/zh-cn.json +++ b/client/strings/zh-cn.json @@ -163,6 +163,7 @@ "LabelAddToPlaylistBatch": "添加 {0} 个项目到播放列表", "LabelAll": "全部", "LabelAllUsers": "所有用户", + "LabelAlreadyInYourLibrary": "Already in your library", "LabelAppend": "附加", "LabelAuthor": "作者", "LabelAuthorFirstLast": "作者 (姓 名)", From c820d0e62bb1982035f05a0691fc43f8cdb48bce Mon Sep 17 00:00:00 2001 From: mfcar Date: Fri, 24 Feb 2023 23:36:15 +0000 Subject: [PATCH 2/4] Fix truncate hiding explicit icon --- client/components/cards/LazyBookCard.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 044fb9cf..fce597ca 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -7,9 +7,9 @@
-
+
- {{ displayTitle }} + {{ displayTitle }}
From 3f859723a674b27011fa566f48666d1af2feb376 Mon Sep 17 00:00:00 2001 From: mfcar Date: Fri, 24 Feb 2023 23:45:06 +0000 Subject: [PATCH 3/4] Typo --- client/pages/library/_library/podcast/search.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pages/library/_library/podcast/search.vue b/client/pages/library/_library/podcast/search.vue index 0a362e26..d1d15775 100644 --- a/client/pages/library/_library/podcast/search.vue +++ b/client/pages/library/_library/podcast/search.vue @@ -185,7 +185,7 @@ export default { this.processing = true const podcasts = await this.$axios.$get(`/api/libraries/${this.currentLibraryId}/items?page=0&minified=1`).catch((error) => { - console.error('failed to fetch books', error) + console.error('Failed to fetch podcasts', error) return [] }) this.existentPodcasts = podcasts.results.map((p) => { From ba4f585318ad8f6e2ff99f7f4f0bd5545a4a13be Mon Sep 17 00:00:00 2001 From: advplyr <67830747+advplyr@users.noreply.github.com> Date: Fri, 24 Feb 2023 17:57:25 -0600 Subject: [PATCH 4/4] Update client/pages/library/_library/podcast/search.vue --- client/pages/library/_library/podcast/search.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pages/library/_library/podcast/search.vue b/client/pages/library/_library/podcast/search.vue index d1d15775..bef8280b 100644 --- a/client/pages/library/_library/podcast/search.vue +++ b/client/pages/library/_library/podcast/search.vue @@ -152,7 +152,7 @@ export default { }) console.log('Got results', results) for (let result of results) { - let podcast = this.existentPodcasts.find((p) => p.itunesId === result.id || p.title === result.title.toLowerCase()); + let podcast = this.existentPodcasts.find((p) => p.itunesId === result.id || p.title === result.title.toLowerCase()) if (podcast) { result.alreadyInLibrary = true }