diff --git a/client/components/AudioPlayer.vue b/client/components/AudioPlayer.vue index 1bdb78a6..bc1b0844 100644 --- a/client/components/AudioPlayer.vue +++ b/client/components/AudioPlayer.vue @@ -15,7 +15,7 @@
- +
@@ -496,14 +496,39 @@ export default { if (settings.playbackRate && this.playbackRate !== settings.playbackRate) { this.updatePlaybackRate(settings.playbackRate) } + }, + volumeUp() { + if (this.volume >= 1) return + this.volume = Math.min(1, this.volume + 0.1) + this.updateVolume(this.volume) + }, + volumeDown() { + if (this.volume <= 0) return + this.volume = Math.max(0, this.volume - 0.1) + this.updateVolume(this.volume) + }, + toggleMute() { + if (this.$refs.volumeControl && this.$refs.volumeControl.toggleMute) { + this.$refs.volumeControl.toggleMute() + } + }, + hotkey(keyCode) { + if (keyCode === this.$hotkeys.PLAY_PAUSE) this.playPauseClick() + else if (keyCode === this.$hotkeys.JUMP_FORWARD) this.forward10() + else if (keyCode === this.$hotkeys.JUMP_BACKWARD) this.backward10() + else if (keyCode === this.$hotkeys.VOLUME_UP) this.volumeUp() + else if (keyCode === this.$hotkeys.VOLUME_DOWN) this.volumeDown() + else if (keyCode === this.$hotkeys.MUTE) this.toggleMute() } }, mounted() { this.$store.commit('user/addSettingsListener', { id: 'audioplayer', meth: this.settingsUpdated }) this.init() + this.$eventBus.$on('player-hotkey', this.hotkey) }, beforeDestroy() { this.$store.commit('user/removeSettingsListener', 'audioplayer') + this.$eventBus.$off('player-hotkey', this.hotkey) } } diff --git a/client/components/app/Appbar.vue b/client/components/app/Appbar.vue index 4c3874cc..21403d64 100644 --- a/client/components/app/Appbar.vue +++ b/client/components/app/Appbar.vue @@ -8,13 +8,6 @@

AudioBookshelf

- @@ -133,9 +126,6 @@ export default { } }, methods: { - clickLibrary() { - this.$store.commit('libraries/setShowModal', true) - }, async back() { var popped = await this.$store.dispatch('popRoute') var backTo = popped || '/' diff --git a/client/components/app/ConfigSideNav.vue b/client/components/app/ConfigSideNav.vue new file mode 100644 index 00000000..402d2570 --- /dev/null +++ b/client/components/app/ConfigSideNav.vue @@ -0,0 +1,56 @@ + + + \ No newline at end of file diff --git a/client/components/cards/BookCard.vue b/client/components/cards/BookCard.vue index ed007d85..038a15e4 100644 --- a/client/components/cards/BookCard.vue +++ b/client/components/cards/BookCard.vue @@ -164,11 +164,14 @@ export default { showError() { return this.hasMissingParts || this.hasInvalidParts || this.isMissing || this.isIncomplete }, + isStreaming() { + return this.$store.getters['getAudiobookIdStreaming'] === this.audiobookId + }, showReadButton() { return !this.isSelectionMode && this.showExperimentalFeatures && !this.showPlayButton && this.hasEbook }, showPlayButton() { - return !this.isSelectionMode && !this.isMissing && !this.isIncomplete && this.hasTracks + return !this.isSelectionMode && !this.isMissing && !this.isIncomplete && this.hasTracks && !this.isStreaming }, showSmallEBookIcon() { return !this.isSelectionMode && this.showExperimentalFeatures && this.hasEbook diff --git a/client/components/controls/VolumeControl.vue b/client/components/controls/VolumeControl.vue index 2656d667..b2660470 100644 --- a/client/components/controls/VolumeControl.vue +++ b/client/components/controls/VolumeControl.vue @@ -114,6 +114,9 @@ export default { this.volume = this.lastValue || 0.5 } }, + toggleMute() { + this.clickVolumeIcon() + }, clickVolumeTrack(e) { var vol = e.offsetX / this.trackWidth vol = Math.min(Math.max(vol, 0), 1) diff --git a/client/components/modals/AccountModal.vue b/client/components/modals/AccountModal.vue index 254ae2f1..14fbf9af 100644 --- a/client/components/modals/AccountModal.vue +++ b/client/components/modals/AccountModal.vue @@ -1,5 +1,5 @@