From e1e10dca509c2c2f000eef7611683dca0a6ea77f Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 22 Oct 2022 09:13:20 -0500 Subject: [PATCH] Update:Default library view to detail instead of bookshelf view & update settings copy --- .../components/app/BookShelfCategorized.vue | 2 +- client/components/app/LazyBookshelf.vue | 2 +- client/components/cards/LazyBookCard.vue | 2 +- .../components/cards/LazyCollectionCard.vue | 2 +- client/components/cards/LazySeriesCard.vue | 2 +- client/components/widgets/SeriesSlider.vue | 2 +- client/pages/config/index.vue | 26 +++++++++---------- client/plugins/constants.js | 2 +- server/objects/settings/ServerSettings.js | 2 +- server/utils/constants.js | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/client/components/app/BookShelfCategorized.vue b/client/components/app/BookShelfCategorized.vue index 6c8d4427..99911c72 100644 --- a/client/components/app/BookShelfCategorized.vue +++ b/client/components/app/BookShelfCategorized.vue @@ -72,7 +72,7 @@ export default { return this.$store.getters['libraries/getCurrentLibraryName'] }, isAlternativeBookshelfView() { - return this.$store.getters['getHomeBookshelfView'] === this.$constants.BookshelfView.TITLES + return this.$store.getters['getHomeBookshelfView'] === this.$constants.BookshelfView.DETAIL }, bookCoverWidth() { var coverSize = this.$store.getters['user/getUserSetting']('bookshelfCoverSize') diff --git a/client/components/app/LazyBookshelf.vue b/client/components/app/LazyBookshelf.vue index 13ffe0ef..e0b03022 100644 --- a/client/components/app/LazyBookshelf.vue +++ b/client/components/app/LazyBookshelf.vue @@ -123,7 +123,7 @@ export default { return this.$store.getters['getBookshelfView'] }, isAlternativeBookshelfView() { - return this.bookshelfView === this.$constants.BookshelfView.TITLES + return this.bookshelfView === this.$constants.BookshelfView.DETAIL }, hasFilter() { return this.filterBy && this.filterBy !== 'all' diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index da14c6a0..d437c67d 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -477,7 +477,7 @@ export default { }, isAlternativeBookshelfView() { var constants = this.$constants || this.$nuxt.$constants - return this.bookshelfView === constants.BookshelfView.TITLES + return this.bookshelfView === constants.BookshelfView.DETAIL }, isAuthorBookshelfView() { var constants = this.$constants || this.$nuxt.$constants diff --git a/client/components/cards/LazyCollectionCard.vue b/client/components/cards/LazyCollectionCard.vue index 686890b4..0586ef84 100644 --- a/client/components/cards/LazyCollectionCard.vue +++ b/client/components/cards/LazyCollectionCard.vue @@ -68,7 +68,7 @@ export default { }, isAlternativeBookshelfView() { const constants = this.$constants || this.$nuxt.$constants - return this.bookshelfView == constants.BookshelfView.TITLES + return this.bookshelfView == constants.BookshelfView.DETAIL }, userCanUpdate() { return this.store.getters['user/getUserCanUpdate'] diff --git a/client/components/cards/LazySeriesCard.vue b/client/components/cards/LazySeriesCard.vue index cb47b60c..ebe7cc6d 100644 --- a/client/components/cards/LazySeriesCard.vue +++ b/client/components/cards/LazySeriesCard.vue @@ -107,7 +107,7 @@ export default { }, isAlternativeBookshelfView() { const constants = this.$constants || this.$nuxt.$constants - return this.bookshelfView == constants.BookshelfView.TITLES + return this.bookshelfView == constants.BookshelfView.DETAIL } }, methods: { diff --git a/client/components/widgets/SeriesSlider.vue b/client/components/widgets/SeriesSlider.vue index 60e19928..b1e16c55 100644 --- a/client/components/widgets/SeriesSlider.vue +++ b/client/components/widgets/SeriesSlider.vue @@ -13,7 +13,7 @@
diff --git a/client/pages/config/index.vue b/client/pages/config/index.vue index 714696db..70c25681 100644 --- a/client/pages/config/index.vue +++ b/client/pages/config/index.vue @@ -53,20 +53,20 @@
- +

- Alternative bookshelf view for home page + Home page use bookshelf view info_outlined

- +

- Alternative bookshelf view + Library use bookshelf view info_outlined

@@ -272,8 +272,8 @@ export default { return { isResettingLibraryItems: false, updatingServerSettings: false, - homeUseAlternativeBookshelfView: false, - useAlternativeBookshelfView: false, + homepageUseBookshelfView: false, + useBookshelfView: false, isPurgingCache: false, newServerSettings: {}, tooltips: { @@ -285,7 +285,7 @@ export default { scannerParseSubtitle: 'Extract subtitles from audiobook folder names.
Subtitle must be seperated by " - "
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"', 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.
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', 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)', @@ -358,14 +358,14 @@ export default { scannerCoverProvider: val }) }, - updateHomeAlternativeBookshelfView(val) { + updateHomeUseBookshelfView(val) { 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({ - bookshelfView: val ? this.$constants.BookshelfView.TITLES : this.$constants.BookshelfView.STANDARD + bookshelfView: !val ? this.$constants.BookshelfView.DETAIL : this.$constants.BookshelfView.STANDARD }) }, updateSettingsKey(key, val) { @@ -392,8 +392,8 @@ export default { this.newServerSettings = this.serverSettings ? { ...this.serverSettings } : {} this.newServerSettings.sortingPrefixes = [...(this.newServerSettings.sortingPrefixes || [])] - this.homeUseAlternativeBookshelfView = this.newServerSettings.homeBookshelfView === this.$constants.BookshelfView.TITLES - this.useAlternativeBookshelfView = this.newServerSettings.bookshelfView === this.$constants.BookshelfView.TITLES + this.homepageUseBookshelfView = this.newServerSettings.homeBookshelfView != this.$constants.BookshelfView.DETAIL + this.useBookshelfView = this.newServerSettings.bookshelfView != this.$constants.BookshelfView.DETAIL }, 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?')) { diff --git a/client/plugins/constants.js b/client/plugins/constants.js index 218f415e..f379c618 100644 --- a/client/plugins/constants.js +++ b/client/plugins/constants.js @@ -21,7 +21,7 @@ const BookCoverAspectRatio = { const BookshelfView = { STANDARD: 0, - TITLES: 1, + DETAIL: 1, AUTHOR: 2 // Books shown on author page } diff --git a/server/objects/settings/ServerSettings.js b/server/objects/settings/ServerSettings.js index 9a44f0df..55e5f60a 100644 --- a/server/objects/settings/ServerSettings.js +++ b/server/objects/settings/ServerSettings.js @@ -40,7 +40,7 @@ class ServerSettings { // Bookshelf Display this.homeBookshelfView = BookshelfView.STANDARD - this.bookshelfView = BookshelfView.STANDARD + this.bookshelfView = BookshelfView.DETAIL // Podcasts this.podcastEpisodeSchedule = '0 * * * *' // Every hour diff --git a/server/utils/constants.js b/server/utils/constants.js index 6de2aed3..7f7e324e 100644 --- a/server/utils/constants.js +++ b/server/utils/constants.js @@ -13,7 +13,7 @@ module.exports.BookCoverAspectRatio = { module.exports.BookshelfView = { STANDARD: 0, - TITLES: 1 + DETAIL: 1 } module.exports.LogLevel = {