Front: Shuffle now restart next track from beginning (#70)
This commit is contained in:
parent
43e009de29
commit
541ac29047
|
@ -5,6 +5,8 @@ Changelog
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
- Front: Fixed broken ajax call on radio builder (#69)
|
- Front: Fixed broken ajax call on radio builder (#69)
|
||||||
|
- Front: Shuffle now restart next track from beginning (#70)
|
||||||
|
|
||||||
|
|
||||||
0.5 (2018-02-24)
|
0.5 (2018-02-24)
|
||||||
----------------
|
----------------
|
||||||
|
|
|
@ -308,12 +308,6 @@ export default {
|
||||||
bottom: 5px;
|
bottom: 5px;
|
||||||
left: 10%;
|
left: 10%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
[type="range"] {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,7 @@ export default {
|
||||||
},
|
},
|
||||||
shuffle ({dispatch, commit, state}) {
|
shuffle ({dispatch, commit, state}) {
|
||||||
let shuffled = _.shuffle(state.tracks)
|
let shuffled = _.shuffle(state.tracks)
|
||||||
|
commit('player/currentTime', 0, {root: true})
|
||||||
commit('tracks', [])
|
commit('tracks', [])
|
||||||
dispatch('appendMany', {tracks: shuffled})
|
dispatch('appendMany', {tracks: shuffled})
|
||||||
}
|
}
|
||||||
|
|
|
@ -322,6 +322,7 @@ describe('store/queue', () => {
|
||||||
action: store.actions.shuffle,
|
action: store.actions.shuffle,
|
||||||
params: {state: {tracks: tracks}},
|
params: {state: {tracks: tracks}},
|
||||||
expectedMutations: [
|
expectedMutations: [
|
||||||
|
{ type: 'player/currentTime', payload: 0 , options: {root: true}},
|
||||||
{ type: 'tracks', payload: [] }
|
{ type: 'tracks', payload: [] }
|
||||||
],
|
],
|
||||||
expectedActions: [
|
expectedActions: [
|
||||||
|
|
Loading…
Reference in New Issue