From 1a34f44898036aabf48c9a68ce457f17d6fddc30 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Mon, 23 Apr 2018 19:05:48 +0200 Subject: [PATCH] Fix #150: Player is back in Queue tab --- changes/changelog.d/150.enhancement | 1 + front/src/components/Sidebar.vue | 4 +--- front/src/components/audio/Player.vue | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 changes/changelog.d/150.enhancement diff --git a/changes/changelog.d/150.enhancement b/changes/changelog.d/150.enhancement new file mode 100644 index 000000000..419b0a4b2 --- /dev/null +++ b/changes/changelog.d/150.enhancement @@ -0,0 +1 @@ +Player is back in Queue tab (#150) diff --git a/front/src/components/Sidebar.vue b/front/src/components/Sidebar.vue index 3f793fe02..51e340573 100644 --- a/front/src/components/Sidebar.vue +++ b/front/src/components/Sidebar.vue @@ -49,8 +49,6 @@ class="item" v-if="$store.state.auth.availablePermissions['federation.manage']" :to="{path: '/manage/federation/libraries'}"> {{ $t('Federation') }} - -
@@ -90,7 +88,6 @@
-
{{ $t('You have a radio playing') }} @@ -101,6 +98,7 @@
+
diff --git a/front/src/components/audio/Player.vue b/front/src/components/audio/Player.vue index ad90a5995..f27ff3edb 100644 --- a/front/src/components/audio/Player.vue +++ b/front/src/components/audio/Player.vue @@ -173,11 +173,21 @@ export default { ...mapActions({ togglePlay: 'player/togglePlay', clean: 'queue/clean', - next: 'queue/next', - previous: 'queue/previous', shuffle: 'queue/shuffle', updateProgress: 'player/updateProgress' }), + next () { + let self = this + this.$store.dispatch('queue/next').then(() => { + self.$emit('next') + }) + }, + previous () { + let self = this + this.$store.dispatch('queue/previous').then(() => { + self.$emit('previous') + }) + }, touchProgress (e) { let time let target = this.$refs.progress