Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn page while playing #1383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions components/readers/Reader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</modals-fullscreen-modal>

<!-- ereader settings modal -->
<modals-fullscreen-modal v-model="showSettingsModal" :theme="ereaderTheme" half-screen>
<modals-fullscreen-modal v-model="showSettingsModal" :theme="ereaderTheme">
<div style="box-shadow: 0px -8px 8px #11111155">
<div class="flex items-end justify-between h-14 px-4 pb-2 mb-6">
<h1 class="text-lg">{{ $strings.HeaderEreaderSettings }}</h1>
Expand Down Expand Up @@ -100,6 +100,12 @@
</div>
<ui-toggle-btns v-model="ereaderSettings.navigateWithVolume" :items="navigateWithVolumeItems" @input="settingsUpdated" />
</div>
<div class="flex items-center">
<div class="w-32">
<p class="text-base">{{ $strings.LabelNavigateWithVolumeWhilePlaying}}:</p>
</div>
<ui-toggle-btns v-model="ereaderSettings.navigateWithVolumeWhilePlaying" :items="navigateWithVolumeWhilePlayingItems" @input="settingsUpdated" />
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -132,7 +138,8 @@ export default {
lineSpacing: 115,
spread: 'auto',
textStroke: 0,
navigateWithVolume: 'enabled'
navigateWithVolume: 'enabled',
navigateWithVolumeWhilePlaying: false
}
}
},
Expand Down Expand Up @@ -209,6 +216,18 @@ export default {
}
]
},
navigateWithVolumeWhilePlayingItems() {
return [
{
text: this.$strings.LabelNavigateWithVolumeWhilePlayingEnabled,
value: true
},
{
text: this.$strings.LabelNavigateWithVolumeWhilePlayingDisabled,
value: false
}
]
},
themeItems() {
return [
{
Expand Down Expand Up @@ -424,7 +443,7 @@ export default {
this.isInittingWatchVolume = true
const isWatching = await VolumeButtons.isWatching()

if (this.ereaderSettings.navigateWithVolume !== 'none' && !this.isPlayerOpen) {
if (this.ereaderSettings.navigateWithVolume !== 'none' && (this.ereaderSettings.navigateWithVolumeWhilePlaying || !this.isPlayerOpen)) {
if (!isWatching.value) {
const options = {
disableSystemVolumeHandler: true,
Expand Down
3 changes: 3 additions & 0 deletions strings/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
"LabelNavigateWithVolumeDisabled": "Aus",
"LabelNavigateWithVolumeEnabled": "An",
"LabelNavigateWithVolumeMirrored": "Umgekehrt",
"LabelNavigateWithVolumeWhilePlaying": "Auch bei Wiedergabe blättern",
"LabelNavigateWithVolumeWhilePlayingDisabled": "Aus",
"LabelNavigateWithVolumeWhilePlayingEnabled": "An",
"LabelNever": "Nie",
"LabelNewestAuthors": "Neueste Autoren",
"LabelNewestEpisodes": "Neueste Episoden",
Expand Down
3 changes: 3 additions & 0 deletions strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@
"LabelNavigateWithVolumeDisabled": "Off",
"LabelNavigateWithVolumeEnabled": "On",
"LabelNavigateWithVolumeMirrored": "Mirrored",
"LabelNavigateWithVolumeWhilePlaying": "Also Navigate while playing",
"LabelNavigateWithVolumeWhilePlayingDisabled": "Off",
"LabelNavigateWithVolumeWhilePlayingEnabled": "On",
"LabelNever": "Never",
"LabelNewestAuthors": "Newest Authors",
"LabelNewestEpisodes": "Newest Episodes",
Expand Down
Loading