Merge branch '1083-default-replace-queue' into 'develop'

Fix #1083: Play button now replace current queue instead of appending to it

Closes #1083

See merge request funkwhale/funkwhale!1169
This commit is contained in:
Agate 2020-07-18 16:55:58 +02:00
commit d9279ceee0
2 changed files with 3 additions and 6 deletions

View File

@ -0,0 +1 @@
Play button now replace current queue instead of appending to it (#1083)

View File

@ -2,8 +2,8 @@
<span :title="title" :class="['ui', {'tiny': discrete}, {'icon': !discrete}, {'buttons': !dropdownOnly && !iconOnly}, 'play-button component-play-button']">
<button
v-if="!dropdownOnly"
:title="labels.playNow"
@click.stop.prevent="addNext(true)"
:title="labels.replacePlay"
@click.stop.prevent="replacePlay"
:disabled="!playable"
:class="buttonClasses.concat(['ui', {loading: isLoading}, {'mini': discrete}, {disabled: !playable}])">
<i :class="[playIconClass, 'icon']"></i>
@ -25,9 +25,6 @@
<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>
<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">
<i class="feed icon"></i><translate translate-context="*/Queue/Button.Label/Short, Verb">Start radio</translate>
</button>
@ -231,7 +228,6 @@ export default {
jQuery(self.$el).find('.ui.dropdown').dropdown('hide')
},
addNext (next) {
console.log('CLICKED')
let self = this
let wasEmpty = this.$store.state.queue.tracks.length === 0
this.getPlayableTracks().then((tracks) => {