Disable previous button if queue is empty
This commit is contained in:
parent
eea1abad5c
commit
69a3f34784
|
@ -58,8 +58,9 @@
|
|||
<div class="two wide column controls ui grid">
|
||||
<div
|
||||
title="Previous track"
|
||||
class="two wide column control">
|
||||
<i @click="previous" class="ui step backward big icon"></i>
|
||||
class="two wide column control"
|
||||
:disabled="emptyQueue">
|
||||
<i @click="previous" :class="['ui', 'backward', {'disabled': emptyQueue}, 'big', 'icon']"></i>
|
||||
</div>
|
||||
<div
|
||||
v-if="!playing"
|
||||
|
@ -204,6 +205,7 @@ export default {
|
|||
...mapGetters({
|
||||
currentTrack: 'queue/currentTrack',
|
||||
hasNext: 'queue/hasNext',
|
||||
emptyQueue: 'queue/isEmpty',
|
||||
durationFormatted: 'player/durationFormatted',
|
||||
currentTimeFormatted: 'player/currentTimeFormatted',
|
||||
progress: 'player/progress'
|
||||
|
|
|
@ -48,7 +48,8 @@ export default {
|
|||
},
|
||||
hasNext: state => {
|
||||
return state.currentIndex < state.tracks.length - 1
|
||||
}
|
||||
},
|
||||
isEmpty: state => state.tracks.length === 0
|
||||
},
|
||||
actions: {
|
||||
append ({commit, state, dispatch}, {track, index, skipPlay}) {
|
||||
|
|
Loading…
Reference in New Issue