forked from rc/aircox
cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: rc/aircox#131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
This commit is contained in:
@ -1,21 +1,23 @@
|
||||
<template>
|
||||
<div class="playlist">
|
||||
<slot name="header"></slot>
|
||||
<div class="a-playlist">
|
||||
<div class="header"><slot name="header"></slot></div>
|
||||
<ul :class="listClass">
|
||||
<li v-for="(item,index) in items" :class="itemClass" @click="!hasAction('play') && select(index)"
|
||||
<li v-for="(item,index) in items" :class="[itemClass, player.isPlaying(item) ? 'is-active' : '']" @click="!hasAction('play') && select(index)"
|
||||
:key="index">
|
||||
<a :class="player.isPlaying(item) ? 'is-active' : ''">
|
||||
<ASoundItem
|
||||
:data="item" :index="index" :set="set" :player="player_"
|
||||
@togglePlay="togglePlay(index)"
|
||||
:actions="actions">
|
||||
<template v-slot:extra-right="{}">
|
||||
<button class="button" v-if="editable" @click.stop="remove(index,true)">
|
||||
<span class="icon is-small"><span class="fa fa-close"></span></span>
|
||||
</button>
|
||||
</template>
|
||||
</ASoundItem>
|
||||
</a>
|
||||
<ASoundItem
|
||||
:data="item" :index="index" :set="set" :player="player_"
|
||||
@togglePlay="togglePlay(index)"
|
||||
:actions="actions">
|
||||
<template #after-title="bindings">
|
||||
<slot name="after-title" v-bind="bindings"></slot>
|
||||
</template>
|
||||
<template #actions="bindings">
|
||||
<slot name="actions" v-bind="bindings"></slot>
|
||||
<button class="button" v-if="editable" @click.stop="remove(index,true)">
|
||||
<span class="icon is-small"><span class="fa fa-close"></span></span>
|
||||
</button>
|
||||
</template>
|
||||
</ASoundItem>
|
||||
</li>
|
||||
</ul>
|
||||
<slot name="footer"></slot>
|
||||
@ -32,9 +34,11 @@ export default {
|
||||
|
||||
props: {
|
||||
actions: Array,
|
||||
// FIXME: remove
|
||||
name: String,
|
||||
player: Object,
|
||||
editable: Boolean,
|
||||
withLink: Boolean
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
Reference in New Issue
Block a user