diff --git a/CHANGELOG b/CHANGELOG index 0a6e27daf..0f09eda42 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ Changelog ---------------- - Front: Fixed broken ajax call on radio builder (#69) +- Front: Shuffle now restart next track from beginning (#70) + 0.5 (2018-02-24) ---------------- diff --git a/front/src/components/audio/Player.vue b/front/src/components/audio/Player.vue index 5e9965158..0fe36fac4 100644 --- a/front/src/components/audio/Player.vue +++ b/front/src/components/audio/Player.vue @@ -308,12 +308,6 @@ export default { bottom: 5px; left: 10%; cursor: pointer; - display: none; - } - &:hover { - [type="range"] { - display: block; - } } } diff --git a/front/src/store/queue.js b/front/src/store/queue.js index ac28a1e0e..1725699d0 100644 --- a/front/src/store/queue.js +++ b/front/src/store/queue.js @@ -142,6 +142,7 @@ export default { }, shuffle ({dispatch, commit, state}) { let shuffled = _.shuffle(state.tracks) + commit('player/currentTime', 0, {root: true}) commit('tracks', []) dispatch('appendMany', {tracks: shuffled}) } diff --git a/front/test/unit/specs/store/queue.spec.js b/front/test/unit/specs/store/queue.spec.js index 8a79c07bd..3b970647f 100644 --- a/front/test/unit/specs/store/queue.spec.js +++ b/front/test/unit/specs/store/queue.spec.js @@ -322,6 +322,7 @@ describe('store/queue', () => { action: store.actions.shuffle, params: {state: {tracks: tracks}}, expectedMutations: [ + { type: 'player/currentTime', payload: 0 , options: {root: true}}, { type: 'tracks', payload: [] } ], expectedActions: [