mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 18:01:42 +00:00
toggle switch off by default
This commit is contained in:
parent
35862aec9b
commit
4b83e740c1
7 changed files with 28 additions and 2 deletions
|
|
@ -78,6 +78,9 @@ export default {
|
|||
bookCovers() {
|
||||
return this.book.covers || []
|
||||
},
|
||||
serverSettings() {
|
||||
return this.$store.state.serverSettings
|
||||
},
|
||||
bookDuration() {
|
||||
return (this.book.duration || 0) * 60
|
||||
},
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ export default {
|
|||
value: 'media.metadata.publishedYear'
|
||||
},
|
||||
{
|
||||
text: 'Rating',
|
||||
text: this.$strings.LabelRating,
|
||||
value: 'media.metadata.rating'
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 || {}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -130,6 +130,16 @@
|
|||
</ui-tooltip>
|
||||
</div>
|
||||
|
||||
<div role="article" :aria-label="$strings.LabelSettingsEnableBookRatingsHelp" class="flex items-center py-2">
|
||||
<ui-toggle-switch :label="$strings.LabelSettingsEnableBookRatings" v-model="newServerSettings.enableBookRatings" :disabled="updatingServerSettings" @input="(val) => updateSettingsKey('enableBookRatings', val)" />
|
||||
<ui-tooltip aria-hidden="true" :text="$strings.LabelSettingsEnableBookRatingsHelp">
|
||||
<p class="pl-4">
|
||||
<span id="settings-enable-book-ratings">{{ $strings.LabelSettingsEnableBookRatings }}</span>
|
||||
<span class="material-symbols icon-text">info</span>
|
||||
</p>
|
||||
</ui-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="grow py-2">
|
||||
<ui-dropdown :label="$strings.LabelSettingsDateFormat" v-model="newServerSettings.dateFormat" :items="dateFormats" small class="max-w-72" @input="(val) => updateSettingsKey('dateFormat', val)" />
|
||||
<p class="text-xs ml-1 text-white/60">{{ $strings.LabelExample }}: {{ dateExample }}</p>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
</p>
|
||||
<p v-else class="mb-2 mt-0.5 text-gray-200 text-xl">by Unknown</p>
|
||||
|
||||
<div v-if="ratingValue > 0 && !isPodcast" class="flex items-center mb-2 mt-1">
|
||||
<div v-if="ratingValue > 0 && !isPodcast && serverSettings.enableBookRatings" class="flex items-center mb-2 mt-1">
|
||||
<span v-for="i in 5" :key="i" class="material-symbols text-sm mr-0.5" :class="ratingValue >= i - 0.5 ? 'text-warning fill' : 'text-gray-500'">{{ ratingValue >= i ? 'star' : ratingValue >= i - 0.5 ? 'star_half' : 'star_border' }}</span>
|
||||
<span class="ml-1 text-gray-300">{{ ratingValue.toFixed(1) }}</span>
|
||||
</div>
|
||||
|
|
@ -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']
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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.<br>Note: This will extend scan time",
|
||||
"LabelSettingsHideSingleBookSeries": "Hide single book series",
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue