feat: Add a Show Subtitles option

This commit is contained in:
mikiher 2024-06-04 20:07:36 +03:00
parent 5f8066e601
commit 3ef189ed4a
5 changed files with 33 additions and 0 deletions

View file

@ -68,6 +68,8 @@
<div class="flex-grow hidden sm:inline-block" />
<ui-checkbox v-if="isLibraryPage && !isBatchSelecting" v-model="settings.showSubtitles" :label="$strings.LabelShowSubtitles" checkbox-bg="bg" check-color="white" small class="mr-6" @input="updateShowSubtitles" />
<!-- collapse series checkbox -->
<ui-checkbox v-if="isLibraryPage && isBookLibrary && !isBatchSelecting" v-model="settings.collapseSeries" :label="$strings.LabelCollapseSeries" checkbox-bg="bg" check-color="white" small class="mr-2" @input="updateCollapseSeries" />
@ -88,11 +90,17 @@
<ui-context-menu-dropdown v-if="contextMenuItems.length" :items="contextMenuItems" :menu-width="110" class="ml-2" @action="contextMenuAction" />
</template>
<!-- home page -->
<template v-else-if="isHome">
<div class="flex-grow" />
<ui-checkbox v-model="settings.showSubtitles" :label="$strings.LabelShowSubtitles" checkbox-bg="bg" check-color="white" small class="mr-6" @input="updateShowSubtitles" />
</template>
<!-- search page -->
<template v-else-if="page === 'search'">
<div class="flex-grow" />
<p>{{ $strings.MessageSearchResultsFor }} "{{ searchQuery }}"</p>
<div class="flex-grow" />
<ui-checkbox v-model="settings.showSubtitles" :label="$strings.LabelShowSubtitles" checkbox-bg="bg" check-color="white" small class="mr-6" @input="updateShowSubtitles" />
</template>
<!-- authors page -->
<template v-else-if="page === 'authors'">
@ -482,6 +490,9 @@ export default {
updateCollapseBookSeries() {
this.saveSettings()
},
updateShowSubtitles() {
this.saveSettings()
},
updateAuthorSort() {
this.saveSettings()
},