Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JocelynDelalande
funkwhale
Commits
cd1c3ca3
Verified
Commit
cd1c3ca3
authored
7 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Fixed #52: Added shuffling controls
parent
f6c939db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG
+1
-0
1 addition, 0 deletions
CHANGELOG
front/src/audio/queue.js
+10
-1
10 additions, 1 deletion
front/src/audio/queue.js
front/src/components/audio/Player.vue
+9
-1
9 additions, 1 deletion
front/src/components/audio/Player.vue
with
20 additions
and
2 deletions
CHANGELOG
+
1
−
0
View file @
cd1c3ca3
...
...
@@ -9,6 +9,7 @@ Changelog
as a favorite (#53)
- Shortcuts: avoid collisions between shortcuts by using the exact modifier (#53)
- Player: Added looping controls and shortcuts (#52)
- Player: Added shuffling controls and shortcuts (#52)
0.2.6 (2017-12-15)
...
...
This diff is collapsed.
Click to expand it.
front/src/audio/queue.js
+
10
−
1
View file @
cd1c3ca3
import
Vue
from
'
vue
'
import
_
from
'
lodash
'
import
logger
from
'
@/logging
'
import
cache
from
'
@/cache
'
import
config
from
'
@/config
'
import
Audio
from
'
@/audio
'
import
backend
from
'
@/audio/backend
'
import
radios
from
'
@/radios
'
import
Vue
from
'
vue
'
import
url
from
'
@/utils/url
'
import
auth
from
'
@/auth
'
...
...
@@ -316,6 +318,13 @@ class Queue {
}
}
shuffle
()
{
let
tracks
=
this
.
tracks
let
shuffled
=
_
.
shuffle
(
tracks
)
this
.
clean
()
this
.
appendMany
(
shuffled
)
}
}
let
queue
=
new
Queue
()
...
...
This diff is collapsed.
Click to expand it.
front/src/components/audio/Player.vue
+
9
−
1
View file @
cd1c3ca3
...
...
@@ -97,7 +97,14 @@
class=
"repeat orange secondary icon"
>
</i>
</div>
<div
class=
"three wide column"
></div>
<div
@
click=
"queue.shuffle()"
:disabled=
"queue.tracks.length === 0"
title=
"Shuffle your queue"
class=
"two wide column control"
>
<i
:class=
"['ui', 'random', 'secondary',
{'disabled': queue.tracks.length === 0}, 'icon']" >
</i>
</div>
<div
class=
"one wide column"
></div>
<div
@
click=
"queue.clean()"
:disabled=
"queue.tracks.length === 0"
...
...
@@ -114,6 +121,7 @@
@
keydown.ctrl.up.prevent.exact=
"queue.incrementVolume(0.1)"
@
keydown.f.prevent.exact=
"favoriteTracks.toggle(queue.currentTrack.id)"
@
keydown.l.prevent.exact=
"queue.toggleLooping"
@
keydown.s.prevent.exact=
"queue.shuffle"
/>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment