From 4b83e740c1c96c61e8aa1d35efd0885f506584fa Mon Sep 17 00:00:00 2001 From: "danny.rich" Date: Mon, 1 Dec 2025 14:43:06 -0500 Subject: [PATCH] toggle switch off by default --- client/components/cards/BookMatchCard.vue | 3 +++ client/components/controls/LibrarySortSelect.vue | 2 +- client/components/modals/item/tabs/Match.vue | 3 +++ client/pages/config/index.vue | 10 ++++++++++ client/pages/item/_id/index.vue | 5 ++++- client/strings/en-us.json | 4 ++++ server/objects/settings/ServerSettings.js | 3 +++ 7 files changed, 28 insertions(+), 2 deletions(-) diff --git a/client/components/cards/BookMatchCard.vue b/client/components/cards/BookMatchCard.vue index bff37d3e2..acf79802d 100644 --- a/client/components/cards/BookMatchCard.vue +++ b/client/components/cards/BookMatchCard.vue @@ -78,6 +78,9 @@ export default { bookCovers() { return this.book.covers || [] }, + serverSettings() { + return this.$store.state.serverSettings + }, bookDuration() { return (this.book.duration || 0) * 60 }, diff --git a/client/components/controls/LibrarySortSelect.vue b/client/components/controls/LibrarySortSelect.vue index 75354dfb3..57c1165e7 100644 --- a/client/components/controls/LibrarySortSelect.vue +++ b/client/components/controls/LibrarySortSelect.vue @@ -111,7 +111,7 @@ export default { value: 'media.metadata.publishedYear' }, { - text: 'Rating', + text: this.$strings.LabelRating, value: 'media.metadata.rating' }, { diff --git a/client/components/modals/item/tabs/Match.vue b/client/components/modals/item/tabs/Match.vue index 193a7eb21..27300ebdc 100644 --- a/client/components/modals/item/tabs/Match.vue +++ b/client/components/modals/item/tabs/Match.vue @@ -336,6 +336,9 @@ export default { bookCoverAspectRatio() { return this.$store.getters['libraries/getBookCoverAspectRatio'] }, + serverSettings() { + return this.$store.state.serverSettings + }, filterData() { return this.$store.state.libraries.filterData || {} }, diff --git a/client/pages/config/index.vue b/client/pages/config/index.vue index b8cf3cff2..98f2684de 100644 --- a/client/pages/config/index.vue +++ b/client/pages/config/index.vue @@ -130,6 +130,16 @@ +
+ + +
+

{{ $strings.LabelExample }}: {{ dateExample }}

diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index e667bbef7..1ee142d4d 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -45,7 +45,7 @@

by Unknown

-
+
{{ ratingValue >= i ? 'star' : ratingValue >= i - 0.5 ? 'star_half' : 'star_border' }} {{ ratingValue.toFixed(1) }}
@@ -203,6 +203,9 @@ export default { userIsAdminOrUp() { return this.$store.getters['user/getIsAdminOrUp'] }, + serverSettings() { + return this.$store.state.serverSettings + }, bookCoverAspectRatio() { return this.$store.getters['libraries/getBookCoverAspectRatio'] }, diff --git a/client/strings/en-us.json b/client/strings/en-us.json index 83acb5a69..f9b1aa719 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -545,6 +545,7 @@ "LabelRSSFeedSlug": "RSS Feed Slug", "LabelRSSFeedURL": "RSS Feed URL", "LabelRandomly": "Randomly", + "LabelRating": "Rating", "LabelReAddSeriesToContinueListening": "Re-add series to Continue Listening", "LabelRead": "Read", "LabelReadAgain": "Read Again", @@ -593,8 +594,11 @@ "LabelSettingsEnableWatcherHelp": "Enables the automatic adding/updating of items when file changes are detected. *Requires server restart", "LabelSettingsEpubsAllowScriptedContent": "Allow scripted content in epubs", "LabelSettingsEpubsAllowScriptedContentHelp": "Allow epub files to execute scripts. It is recommended to keep this setting disabled unless you trust the source of the epub files.", + "LabelSettingsEnableBookRatings": "Enable book ratings", "LabelSettingsExperimentalFeatures": "Experimental features", "LabelSettingsExperimentalFeaturesHelp": "Features in development that could use your feedback and help testing. Click to open github discussion.", + "LabelSettingsEnableBookRatings": "Show star ratings on book page", + "LabelSettingsEnableBookRatingsHelp": "Show star ratings on the book details page when available.", "LabelSettingsFindCovers": "Find covers", "LabelSettingsFindCoversHelp": "If your audiobook does not have an embedded cover or a cover image inside the folder, the scanner will attempt to find a cover.
Note: This will extend scan time", "LabelSettingsHideSingleBookSeries": "Hide single book series", diff --git a/server/objects/settings/ServerSettings.js b/server/objects/settings/ServerSettings.js index a03e17c75..cc8099931 100644 --- a/server/objects/settings/ServerSettings.js +++ b/server/objects/settings/ServerSettings.js @@ -40,6 +40,7 @@ class ServerSettings { // Bookshelf Display this.homeBookshelfView = BookshelfView.DETAIL this.bookshelfView = BookshelfView.DETAIL + this.enableBookRatings = false // Podcasts this.podcastEpisodeSchedule = '0 * * * *' // Every hour @@ -114,6 +115,7 @@ class ServerSettings { this.homeBookshelfView = settings.homeBookshelfView || BookshelfView.STANDARD this.bookshelfView = settings.bookshelfView || BookshelfView.STANDARD + this.enableBookRatings = !!settings.enableBookRatings this.sortingIgnorePrefix = !!settings.sortingIgnorePrefix this.sortingPrefixes = settings.sortingPrefixes || ['the'] @@ -226,6 +228,7 @@ class ServerSettings { loggerScannerLogsToKeep: this.loggerScannerLogsToKeep, homeBookshelfView: this.homeBookshelfView, bookshelfView: this.bookshelfView, + enableBookRatings: this.enableBookRatings, podcastEpisodeSchedule: this.podcastEpisodeSchedule, sortingIgnorePrefix: this.sortingIgnorePrefix, sortingPrefixes: [...this.sortingPrefixes],