mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-27 22:29:38 +00:00
Add:Separate setting for alt bookshelf view on home page
This commit is contained in:
parent
d06c61b329
commit
c5f91ec508
7 changed files with 52 additions and 15 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { checkForUpdate, currentVersion } from '@/plugins/version'
|
||||
import Vue from 'vue'
|
||||
const { Constants } = require('../plugins/constants')
|
||||
|
||||
export const state = () => ({
|
||||
Source: null,
|
||||
|
|
@ -45,6 +46,14 @@ export const getters = {
|
|||
if (!state.streamLibraryItem) return null
|
||||
if (!episodeId) return state.streamLibraryItem.id == libraryItemId
|
||||
return state.streamLibraryItem.id == libraryItemId && state.streamEpisodeId == episodeId
|
||||
},
|
||||
getBookshelfView: state => {
|
||||
if (!state.serverSettings || isNaN(state.serverSettings.bookshelfView)) return Constants.BookshelfView.STANDARD
|
||||
return state.serverSettings.bookshelfView
|
||||
},
|
||||
getHomeBookshelfView: state => {
|
||||
if (!state.serverSettings || isNaN(state.serverSettings.homeBookshelfView)) return Constants.BookshelfView.STANDARD
|
||||
return state.serverSettings.homeBookshelfView
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
const { Constants } = require('../plugins/constants')
|
||||
|
||||
export const state = () => ({
|
||||
libraries: [],
|
||||
lastLoad: 0,
|
||||
|
|
@ -49,7 +51,7 @@ export const getters = {
|
|||
},
|
||||
getBookCoverAspectRatio: (state, getters) => {
|
||||
if (!getters.getCurrentLibrarySettings || isNaN(getters.getCurrentLibrarySettings.coverAspectRatio)) return 1
|
||||
return getters.getCurrentLibrarySettings.coverAspectRatio === 0 ? 1.6 : 1
|
||||
return getters.getCurrentLibrarySettings.coverAspectRatio === Constants.BookCoverAspectRatio.STANDARD ? 1.6 : 1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue