Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
funkwhale
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
167
Issues
167
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
funkwhale
funkwhale
Commits
cd1c3ca3
Verified
Commit
cd1c3ca3
authored
Dec 17, 2017
by
Agate
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #52: Added shuffling controls
parent
f6c939db
Pipeline
#317
passed with stage
in 1 minute and 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
CHANGELOG
CHANGELOG
+1
-0
front/src/audio/queue.js
front/src/audio/queue.js
+10
-1
front/src/components/audio/Player.vue
front/src/components/audio/Player.vue
+9
-1
No files found.
CHANGELOG
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)
...
...
front/src/audio/queue.js
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
()
...
...
front/src/components/audio/Player.vue
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>
...
...
Write
Preview
Markdown
is supported
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