mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-03 09:34:51 +02:00
Add:Ebook files table and supplementary ereader
This commit is contained in:
parent
543ac209e4
commit
d8bc26f5f8
16 changed files with 1283 additions and 638 deletions
|
@ -15,20 +15,20 @@ export const getters = {
|
|||
return state.libraries.find(lib => lib.id === state.currentLibraryId)
|
||||
},
|
||||
getCurrentLibraryName: (state, getters) => {
|
||||
const currLib = getters.getCurrentLibrary
|
||||
return currLib ? currLib.name : null
|
||||
return getters.getCurrentLibrary?.name || null
|
||||
},
|
||||
getCurrentLibraryMediaType: (state, getters) => {
|
||||
const currLib = getters.getCurrentLibrary
|
||||
return currLib ? currLib.mediaType : null
|
||||
return getters.getCurrentLibrary?.mediaType || null
|
||||
},
|
||||
getCurrentLibrarySettings: (state, getters) => {
|
||||
if (!getters.getCurrentLibrary) return null
|
||||
return getters.getCurrentLibrary.settings
|
||||
return getters.getCurrentLibrary?.settings || null
|
||||
},
|
||||
getBookCoverAspectRatio: (state, getters) => {
|
||||
if (!getters.getCurrentLibrarySettings || isNaN(getters.getCurrentLibrarySettings.coverAspectRatio)) return 1
|
||||
if (isNaN(getters.getCurrentLibrarySettings?.coverAspectRatio)) return 1
|
||||
return getters.getCurrentLibrarySettings.coverAspectRatio === BookCoverAspectRatio.STANDARD ? 1.6 : 1
|
||||
},
|
||||
getLibraryIsAudiobooksOnly: (state, getters) => {
|
||||
return !!getters.getCurrentLibrarySettings?.audiobooksOnly
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue