Add:Ebook files table and supplementary ereader

This commit is contained in:
advplyr 2023-06-11 13:36:19 -05:00
parent 543ac209e4
commit d8bc26f5f8
16 changed files with 1283 additions and 638 deletions

View file

@ -264,16 +264,25 @@ export default {
flow: 'paginated'
})
// load saved progress
reader.rendition.display(this.savedEbookLocation || reader.book.locations.start)
// load style
reader.rendition.themes.default({ '*': { color: '#fff!important', 'background-color': 'rgb(35 35 35)!important' }, a: { color: '#fff!important' } })
reader.book.ready.then(() => {
// load saved progress
// when not checking spine first uncaught exception is thrown
if (this.savedEbookLocation && reader.book.spine.get(this.savedEbookLocation)) {
reader.rendition.display(this.savedEbookLocation)
} else {
reader.rendition.display(reader.book.locations.start)
}
// set up event listeners
reader.rendition.on('relocated', reader.relocated)
reader.rendition.on('displayError', (err) => {
console.log('Display error', err)
})
// load ebook cfi locations
const savedLocations = this.loadLocations()
if (savedLocations) {