Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
interfect
funkwhale
Commits
69a3f347
Commit
69a3f347
authored
Apr 01, 2018
by
Bat
Browse files
Disable previous button if queue is empty
parent
eea1abad
Changes
2
Hide whitespace changes
Inline
Side-by-side
front/src/components/audio/Player.vue
View file @
69a3f347
...
...
@@ -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
'
...
...
front/src/store/queue.js
View file @
69a3f347
...
...
@@ -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
})
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment