Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
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
funkwhale
funkwhale
Commits
ee0e416e
Commit
ee0e416e
authored
6 years ago
by
Ciarán Ainsworth
Browse files
Options
Downloads
Patches
Plain Diff
Added action to replace current queue
parent
a6a649d4
No related branches found
No related tags found
1 merge request
!820
Resolve "Add a "Replace current playlist" option"
Pipeline
#4534
passed
6 years ago
Stage: review
Stage: lint
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/changelog.d/761.enhancement
+1
-0
1 addition, 0 deletions
changes/changelog.d/761.enhancement
front/src/components/audio/PlayButton.vue
+15
-2
15 additions, 2 deletions
front/src/components/audio/PlayButton.vue
with
16 additions
and
2 deletions
changes/changelog.d/761.enhancement
0 → 100644
+
1
−
0
View file @
ee0e416e
Added the option to replace the queue's current contents with a selected album or track (#761)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
front/src/components/audio/PlayButton.vue
+
15
−
2
View file @
ee0e416e
...
@@ -19,7 +19,11 @@
...
@@ -19,7 +19,11 @@
<i
class=
"step forward icon"
></i>
{{ labels.playNext }}
<i
class=
"step forward icon"
></i>
{{ labels.playNext }}
</button>
</button>
<button
class=
"item basic"
ref=
"playNow"
data-ref=
"playNow"
:disabled=
"!playable"
@
click.stop.prevent=
"addNext(true)"
:title=
"labels.playNow"
>
<button
class=
"item basic"
ref=
"playNow"
data-ref=
"playNow"
:disabled=
"!playable"
@
click.stop.prevent=
"addNext(true)"
:title=
"labels.playNow"
>
<i
class=
"play icon"
></i>
{{ labels.playNow }}
</button>
<i
class=
"play icon"
></i>
{{ labels.playNow }}
</button>
<button
class=
"item basic"
ref=
"replacePlay"
data-ref=
"replacePlay"
:disabled=
"!playable"
@
click.stop.prevent=
"replacePlay()"
:title=
"labels.replacePlay"
>
<i
class=
"list icon"
></i>
{{ labels.replacePlay }}
</button>
<button
v-if=
"track"
class=
"item basic"
:disabled=
"!playable"
@
click.stop.prevent=
"$store.dispatch('radios/start', {type: 'similar', objectId: track.id})"
:title=
"labels.startRadio"
>
<button
v-if=
"track"
class=
"item basic"
:disabled=
"!playable"
@
click.stop.prevent=
"$store.dispatch('radios/start', {type: 'similar', objectId: track.id})"
:title=
"labels.startRadio"
>
<i
class=
"feed icon"
></i><translate
translate-context=
"*/Queue/Button.Label/Short, Verb"
>
Start radio
</translate>
<i
class=
"feed icon"
></i><translate
translate-context=
"*/Queue/Button.Label/Short, Verb"
>
Start radio
</translate>
</button>
</button>
...
@@ -74,7 +78,8 @@ export default {
...
@@ -74,7 +78,8 @@ export default {
playNow
:
this
.
$pgettext
(
'
*/Queue/Dropdown/Button/Title
'
,
'
Play now
'
),
playNow
:
this
.
$pgettext
(
'
*/Queue/Dropdown/Button/Title
'
,
'
Play now
'
),
addToQueue
:
this
.
$pgettext
(
'
*/Queue/Dropdown/Button/Title
'
,
'
Add to current queue
'
),
addToQueue
:
this
.
$pgettext
(
'
*/Queue/Dropdown/Button/Title
'
,
'
Add to current queue
'
),
playNext
:
this
.
$pgettext
(
'
*/Queue/Dropdown/Button/Title
'
,
'
Play next
'
),
playNext
:
this
.
$pgettext
(
'
*/Queue/Dropdown/Button/Title
'
,
'
Play next
'
),
startRadio
:
this
.
$pgettext
(
'
*/Queue/Dropdown/Button/Title
'
,
'
Play similar songs
'
)
startRadio
:
this
.
$pgettext
(
'
*/Queue/Dropdown/Button/Title
'
,
'
Play similar songs
'
),
replacePlay
:
this
.
$pgettext
(
'
*/Queue/Dropdown/Button/Title
'
,
'
Replace current queue
'
)
}
}
},
},
title
()
{
title
()
{
...
@@ -201,6 +206,14 @@ export default {
...
@@ -201,6 +206,14 @@ export default {
})
})
jQuery
(
self
.
$el
).
find
(
'
.ui.dropdown
'
).
dropdown
(
'
hide
'
)
jQuery
(
self
.
$el
).
find
(
'
.ui.dropdown
'
).
dropdown
(
'
hide
'
)
},
},
replacePlay
()
{
let
self
=
this
self
.
$store
.
dispatch
(
'
queue/clean
'
)
this
.
getPlayableTracks
().
then
((
tracks
)
=>
{
self
.
$store
.
dispatch
(
'
queue/appendMany
'
,
{
tracks
:
tracks
}).
then
(()
=>
self
.
addMessage
(
tracks
))
})
jQuery
(
self
.
$el
).
find
(
'
.ui.dropdown
'
).
dropdown
(
'
hide
'
)
},
addNext
(
next
)
{
addNext
(
next
)
{
let
self
=
this
let
self
=
this
let
wasEmpty
=
this
.
$store
.
state
.
queue
.
tracks
.
length
===
0
let
wasEmpty
=
this
.
$store
.
state
.
queue
.
tracks
.
length
===
0
...
...
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