Update:Default library view to detail instead of bookshelf view & update settings copy

This commit is contained in:
advplyr 2022-10-22 09:13:20 -05:00
parent 0e96465d74
commit e1e10dca50
10 changed files with 22 additions and 22 deletions

View File

@ -72,7 +72,7 @@ export default {
return this.$store.getters['libraries/getCurrentLibraryName'] return this.$store.getters['libraries/getCurrentLibraryName']
}, },
isAlternativeBookshelfView() { isAlternativeBookshelfView() {
return this.$store.getters['getHomeBookshelfView'] === this.$constants.BookshelfView.TITLES return this.$store.getters['getHomeBookshelfView'] === this.$constants.BookshelfView.DETAIL
}, },
bookCoverWidth() { bookCoverWidth() {
var coverSize = this.$store.getters['user/getUserSetting']('bookshelfCoverSize') var coverSize = this.$store.getters['user/getUserSetting']('bookshelfCoverSize')

View File

@ -123,7 +123,7 @@ export default {
return this.$store.getters['getBookshelfView'] return this.$store.getters['getBookshelfView']
}, },
isAlternativeBookshelfView() { isAlternativeBookshelfView() {
return this.bookshelfView === this.$constants.BookshelfView.TITLES return this.bookshelfView === this.$constants.BookshelfView.DETAIL
}, },
hasFilter() { hasFilter() {
return this.filterBy && this.filterBy !== 'all' return this.filterBy && this.filterBy !== 'all'

View File

@ -477,7 +477,7 @@ export default {
}, },
isAlternativeBookshelfView() { isAlternativeBookshelfView() {
var constants = this.$constants || this.$nuxt.$constants var constants = this.$constants || this.$nuxt.$constants
return this.bookshelfView === constants.BookshelfView.TITLES return this.bookshelfView === constants.BookshelfView.DETAIL
}, },
isAuthorBookshelfView() { isAuthorBookshelfView() {
var constants = this.$constants || this.$nuxt.$constants var constants = this.$constants || this.$nuxt.$constants

View File

@ -68,7 +68,7 @@ export default {
}, },
isAlternativeBookshelfView() { isAlternativeBookshelfView() {
const constants = this.$constants || this.$nuxt.$constants const constants = this.$constants || this.$nuxt.$constants
return this.bookshelfView == constants.BookshelfView.TITLES return this.bookshelfView == constants.BookshelfView.DETAIL
}, },
userCanUpdate() { userCanUpdate() {
return this.store.getters['user/getUserCanUpdate'] return this.store.getters['user/getUserCanUpdate']

View File

@ -107,7 +107,7 @@ export default {
}, },
isAlternativeBookshelfView() { isAlternativeBookshelfView() {
const constants = this.$constants || this.$nuxt.$constants const constants = this.$constants || this.$nuxt.$constants
return this.bookshelfView == constants.BookshelfView.TITLES return this.bookshelfView == constants.BookshelfView.DETAIL
} }
}, },
methods: { methods: {

View File

@ -13,7 +13,7 @@
<div ref="slider" class="w-full overflow-y-hidden overflow-x-auto no-scroll -mx-2" style="scroll-behavior: smooth" @scroll="scrolled"> <div ref="slider" class="w-full overflow-y-hidden overflow-x-auto no-scroll -mx-2" style="scroll-behavior: smooth" @scroll="scrolled">
<div class="flex" :style="{ height: height + 'px' }"> <div class="flex" :style="{ height: height + 'px' }">
<template v-for="(item, index) in items"> <template v-for="(item, index) in items">
<cards-lazy-series-card :key="item.id" :ref="`slider-item-${item.id}`" :index="index" :series-mount="item" :height="cardHeight" :width="cardWidth" :book-cover-aspect-ratio="bookCoverAspectRatio" :bookshelf-view="$constants.BookshelfView.TITLES" class="relative mx-2" @hook:updated="setScrollVars" /> <cards-lazy-series-card :key="item.id" :ref="`slider-item-${item.id}`" :index="index" :series-mount="item" :height="cardHeight" :width="cardWidth" :book-cover-aspect-ratio="bookCoverAspectRatio" :bookshelf-view="$constants.BookshelfView.DETAIL" class="relative mx-2" @hook:updated="setScrollVars" />
</template> </template>
</div> </div>
</div> </div>

View File

@ -53,20 +53,20 @@
</div> </div>
<div class="flex items-center py-2"> <div class="flex items-center py-2">
<ui-toggle-switch v-model="homeUseAlternativeBookshelfView" :disabled="updatingServerSettings" @input="updateHomeAlternativeBookshelfView" /> <ui-toggle-switch v-model="homepageUseBookshelfView" :disabled="updatingServerSettings" @input="updateHomeUseBookshelfView" />
<ui-tooltip :text="tooltips.bookshelfView"> <ui-tooltip :text="tooltips.bookshelfView">
<p class="pl-4"> <p class="pl-4">
Alternative bookshelf view for home page Home page use bookshelf view
<span class="material-icons icon-text text-sm">info_outlined</span> <span class="material-icons icon-text text-sm">info_outlined</span>
</p> </p>
</ui-tooltip> </ui-tooltip>
</div> </div>
<div class="flex items-center py-2"> <div class="flex items-center py-2">
<ui-toggle-switch v-model="useAlternativeBookshelfView" :disabled="updatingServerSettings" @input="updateAlternativeBookshelfView" /> <ui-toggle-switch v-model="useBookshelfView" :disabled="updatingServerSettings" @input="updateUseBookshelfView" />
<ui-tooltip :text="tooltips.bookshelfView"> <ui-tooltip :text="tooltips.bookshelfView">
<p class="pl-4"> <p class="pl-4">
Alternative bookshelf view Library use bookshelf view
<span class="material-icons icon-text text-sm">info_outlined</span> <span class="material-icons icon-text text-sm">info_outlined</span>
</p> </p>
</ui-tooltip> </ui-tooltip>
@ -272,8 +272,8 @@ export default {
return { return {
isResettingLibraryItems: false, isResettingLibraryItems: false,
updatingServerSettings: false, updatingServerSettings: false,
homeUseAlternativeBookshelfView: false, homepageUseBookshelfView: false,
useAlternativeBookshelfView: false, useBookshelfView: false,
isPurgingCache: false, isPurgingCache: false,
newServerSettings: {}, newServerSettings: {},
tooltips: { tooltips: {
@ -285,7 +285,7 @@ export default {
scannerParseSubtitle: 'Extract subtitles from audiobook folder names.<br>Subtitle must be seperated by " - "<br>i.e. "Book Title - A Subtitle Here" has the subtitle "A Subtitle Here"', scannerParseSubtitle: 'Extract subtitles from audiobook folder names.<br>Subtitle must be seperated by " - "<br>i.e. "Book Title - A Subtitle Here" has the subtitle "A Subtitle Here"',
sortingIgnorePrefix: 'i.e. for prefix "the" book title "The Book Title" would sort as "Book Title, The"', sortingIgnorePrefix: 'i.e. for prefix "the" book title "The Book Title" would sort as "Book Title, The"',
scannerFindCovers: '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', scannerFindCovers: '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',
bookshelfView: 'Alternative view without wooden bookshelf', bookshelfView: 'Skeumorphic design with wooden shelves',
storeCoverWithItem: 'By default covers are stored in /metadata/items, enabling this setting will store covers in your library item folder. Only one file named "cover" will be kept', storeCoverWithItem: 'By default covers are stored in /metadata/items, enabling this setting will store covers in your library item folder. Only one file named "cover" will be kept',
storeMetadataWithItem: 'By default metadata files are stored in /metadata/items, enabling this setting will store metadata files in your library item folders. Uses .abs file extension', storeMetadataWithItem: 'By default metadata files are stored in /metadata/items, enabling this setting will store metadata files in your library item folders. Uses .abs file extension',
enableEReader: 'E-reader is still a work in progress, but use this setting to open it up to all your users (or use the "Experimental Features" toggle just for use by you)', enableEReader: 'E-reader is still a work in progress, but use this setting to open it up to all your users (or use the "Experimental Features" toggle just for use by you)',
@ -358,14 +358,14 @@ export default {
scannerCoverProvider: val scannerCoverProvider: val
}) })
}, },
updateHomeAlternativeBookshelfView(val) { updateHomeUseBookshelfView(val) {
this.updateServerSettings({ this.updateServerSettings({
homeBookshelfView: val ? this.$constants.BookshelfView.TITLES : this.$constants.BookshelfView.STANDARD homeBookshelfView: !val ? this.$constants.BookshelfView.DETAIL : this.$constants.BookshelfView.STANDARD
}) })
}, },
updateAlternativeBookshelfView(val) { updateUseBookshelfView(val) {
this.updateServerSettings({ this.updateServerSettings({
bookshelfView: val ? this.$constants.BookshelfView.TITLES : this.$constants.BookshelfView.STANDARD bookshelfView: !val ? this.$constants.BookshelfView.DETAIL : this.$constants.BookshelfView.STANDARD
}) })
}, },
updateSettingsKey(key, val) { updateSettingsKey(key, val) {
@ -392,8 +392,8 @@ export default {
this.newServerSettings = this.serverSettings ? { ...this.serverSettings } : {} this.newServerSettings = this.serverSettings ? { ...this.serverSettings } : {}
this.newServerSettings.sortingPrefixes = [...(this.newServerSettings.sortingPrefixes || [])] this.newServerSettings.sortingPrefixes = [...(this.newServerSettings.sortingPrefixes || [])]
this.homeUseAlternativeBookshelfView = this.newServerSettings.homeBookshelfView === this.$constants.BookshelfView.TITLES this.homepageUseBookshelfView = this.newServerSettings.homeBookshelfView != this.$constants.BookshelfView.DETAIL
this.useAlternativeBookshelfView = this.newServerSettings.bookshelfView === this.$constants.BookshelfView.TITLES this.useBookshelfView = this.newServerSettings.bookshelfView != this.$constants.BookshelfView.DETAIL
}, },
resetLibraryItems() { resetLibraryItems() {
if (confirm('WARNING! This action will remove all library items from the database including any updates or matches you have made. This does not do anything to your actual files. Shall we continue?')) { if (confirm('WARNING! This action will remove all library items from the database including any updates or matches you have made. This does not do anything to your actual files. Shall we continue?')) {

View File

@ -21,7 +21,7 @@ const BookCoverAspectRatio = {
const BookshelfView = { const BookshelfView = {
STANDARD: 0, STANDARD: 0,
TITLES: 1, DETAIL: 1,
AUTHOR: 2 // Books shown on author page AUTHOR: 2 // Books shown on author page
} }

View File

@ -40,7 +40,7 @@ class ServerSettings {
// Bookshelf Display // Bookshelf Display
this.homeBookshelfView = BookshelfView.STANDARD this.homeBookshelfView = BookshelfView.STANDARD
this.bookshelfView = BookshelfView.STANDARD this.bookshelfView = BookshelfView.DETAIL
// Podcasts // Podcasts
this.podcastEpisodeSchedule = '0 * * * *' // Every hour this.podcastEpisodeSchedule = '0 * * * *' // Every hour

View File

@ -13,7 +13,7 @@ module.exports.BookCoverAspectRatio = {
module.exports.BookshelfView = { module.exports.BookshelfView = {
STANDARD: 0, STANDARD: 0,
TITLES: 1 DETAIL: 1
} }
module.exports.LogLevel = { module.exports.LogLevel = {