Add:Enable e-reader server setting to allow all users to access experimental e-reader #614

This commit is contained in:
advplyr 2022-05-20 16:34:51 -05:00
parent 302870a101
commit 796602d1b2
12 changed files with 44 additions and 45 deletions

View file

@ -153,9 +153,6 @@ export default {
},
currentChapterName() {
return this.currentChapter ? this.currentChapter.title : ''
},
showExperimentalFeatures() {
return this.$store.state.showExperimentalFeatures
}
},
methods: {

View file

@ -89,9 +89,6 @@ export default {
offsetTop() {
return 64
},
showExperimentalFeatures() {
return this.$store.state.showExperimentalFeatures
},
userIsAdminOrUp() {
return this.$store.getters['user/getIsAdminOrUp']
},

View file

@ -74,9 +74,6 @@ export default {
}
},
computed: {
showExperimentalFeatures() {
return this.$store.state.showExperimentalFeatures
},
coverAspectRatio() {
return this.$store.getters['getServerSetting']('coverAspectRatio')
},

View file

@ -109,19 +109,14 @@ export default {
hasValidCovers() {
var validCovers = this.bookItems.map((bookItem) => bookItem.media.coverPath)
return !!validCovers.length
},
showExperimentalFeatures() {
return this.$store.state.showExperimentalFeatures
}
},
methods: {
mouseoverCard() {
this.isHovering = true
// if (this.$refs.groupcover) this.$refs.groupcover.setHover(true)
},
mouseleaveCard() {
this.isHovering = false
// if (this.$refs.groupcover) this.$refs.groupcover.setHover(false)
},
clickCard() {
this.$emit('click', this.group)

View file

@ -147,6 +147,9 @@ export default {
showExperimentalFeatures() {
return this.store.state.showExperimentalFeatures
},
enableEReader() {
return this.store.getters['getServerSetting']('enableEReader')
},
_libraryItem() {
return this.libraryItem || {}
},
@ -287,13 +290,13 @@ export default {
return this.store.getters['getlibraryItemIdStreaming'] === this.libraryItemId
},
showReadButton() {
return !this.isSelectionMode && this.showExperimentalFeatures && !this.showPlayButton && this.hasEbook
return !this.isSelectionMode && !this.showPlayButton && this.hasEbook && (this.showExperimentalFeatures || this.enableEReader)
},
showPlayButton() {
return !this.isSelectionMode && !this.isMissing && !this.isInvalid && !this.isStreaming && (this.numTracks || this.recentEpisode)
},
showSmallEBookIcon() {
return !this.isSelectionMode && this.showExperimentalFeatures && this.hasEbook
return !this.isSelectionMode && this.hasEbook && (this.showExperimentalFeatures || this.enableEReader)
},
isMissing() {
return this._libraryItem.isMissing

View file

@ -59,9 +59,6 @@ export default {
if (this.bookCoverAspectRatio === 1) return this.width / (120 * 1.6 * 2)
return this.width / 240
},
showExperimentalFeatures() {
return this.store.state.showExperimentalFeatures
},
store() {
return this.$store || this.$nuxt.$store
},

View file

@ -64,8 +64,7 @@ export default {
{
id: 'manage',
title: 'Manage',
component: 'modals-item-tabs-manage',
experimental: true
component: 'modals-item-tabs-manage'
}
]
}