delete sound in list

This commit is contained in:
bkfox
2024-03-26 00:36:51 +01:00
parent 3fb9e0d62a
commit c3c748eebb
5 changed files with 23 additions and 8 deletions

View File

@ -24,8 +24,8 @@
</a-modal>
<slot name="top" :set="set" :items="set.items"></slot>
<a-rows :set="set" :columns="columns"
:labels="initData.fields" :allow-create="true" :orderable="true"
<a-rows :set="set" :columns="allColumns"
:labels="allColumnsLabels" :allow-create="true" :orderable="true"
@move="listItemMove">
<template v-for="[name,slot] of rowsSlots" :key="slot"
v-slot:[slot]="data">
@ -49,7 +49,8 @@
:title="labels.add_sound"
:aria-label="labels.add_sound"
>
<span class="icon"><i class="fa fa-plus"/></span>
<span class="icon">
<i class="fa fa-plus"/></span>
</button>
</div>
</div>
@ -75,6 +76,7 @@ export default {
settingsUrl: String,
soundListUrl: String,
soundUploadUrl: String,
player: Object,
columns: {
type: Array,
default: () => ['name', "type", 'is_public', 'is_downloadable']
@ -88,6 +90,18 @@ export default {
},
computed: {
player_() {
return this.player || window.aircox.player
},
allColumns() {
return [...this.columns, "delete"]
},
allColumnsLabels() {
return {...this.labels, ...this.initData.fields}
},
items() {
return this.set.items
},