Update experimental e-reader alert

This commit is contained in:
advplyr 2022-05-20 16:47:00 -05:00
parent 796602d1b2
commit dabcad5ebd
3 changed files with 9 additions and 5 deletions

View File

@ -26,7 +26,7 @@
</div> </div>
<!-- Split to mp3 --> <!-- Split to mp3 -->
<div v-if="showMp3Split" class="w-full border border-black-200 p-4 my-8"> <div v-if="showMp3Split && showExperimentalFeatures" class="w-full border border-black-200 p-4 my-8">
<div class="flex items-center"> <div class="flex items-center">
<div> <div>
<p class="text-lg">Split M4B to MP3's</p> <p class="text-lg">Split M4B to MP3's</p>
@ -51,7 +51,7 @@
</div> </div>
<!-- Embed Metadata --> <!-- Embed Metadata -->
<div v-if="mediaTracks.length" class="w-full border border-black-200 p-4 my-8"> <div v-if="mediaTracks.length && showExperimentalFeatures" class="w-full border border-black-200 p-4 my-8">
<div class="flex items-center"> <div class="flex items-center">
<div> <div>
<p class="text-lg">Embed Metadata</p> <p class="text-lg">Embed Metadata</p>
@ -113,6 +113,9 @@ export default {
} }
}, },
computed: { computed: {
showExperimentalFeatures() {
return this.$store.state.showExperimentalFeatures
},
libraryItemId() { libraryItemId() {
return this.libraryItem ? this.libraryItem.id : null return this.libraryItem ? this.libraryItem.id : null
}, },

View File

@ -183,7 +183,7 @@
<div> <div>
<div class="flex items-center"> <div class="flex items-center">
<ui-toggle-switch v-model="showExperimentalFeatures" /> <ui-toggle-switch v-model="showExperimentalFeatures" />
<ui-tooltip :text="experimentalFeaturesTooltip"> <ui-tooltip :text="tooltips.experimentalFeatures">
<p class="pl-4 text-lg"> <p class="pl-4 text-lg">
Experimental Features Experimental Features
<a href="https://github.com/advplyr/audiobookshelf/discussions/75" target="_blank"> <a href="https://github.com/advplyr/audiobookshelf/discussions/75" target="_blank">

View File

@ -92,7 +92,8 @@
<!-- Alerts --> <!-- Alerts -->
<div v-show="showExperimentalReadAlert" class="bg-error p-4 rounded-xl flex items-center"> <div v-show="showExperimentalReadAlert" class="bg-error p-4 rounded-xl flex items-center">
<span class="material-icons text-2xl">warning_amber</span> <span class="material-icons text-2xl">warning_amber</span>
<p class="ml-4">Book has no audio tracks but has valid ebook files. The e-reader is experimental and can be turned on in config.</p> <p v-if="userIsAdminOrUp" class="ml-4">Book has no audio tracks but has an ebook. The experimental e-reader can be enabled in config.</p>
<p v-else class="ml-4">Book has no audio tracks but has an ebook. The experimental e-reader must be enabled by a server admin.</p>
</div> </div>
<!-- Podcast episode downloads queue --> <!-- Podcast episode downloads queue -->
@ -227,7 +228,7 @@ export default {
return this.$store.state.showExperimentalFeatures return this.$store.state.showExperimentalFeatures
}, },
enableEReader() { enableEReader() {
return this.store.getters['getServerSetting']('enableEReader') return this.$store.getters['getServerSetting']('enableEReader')
}, },
userIsAdminOrUp() { userIsAdminOrUp() {
return this.$store.getters['user/getIsAdminOrUp'] return this.$store.getters['user/getIsAdminOrUp']