[web] Fix spacing when no buttons in properties

This commit is contained in:
Alain Nussbaumer 2025-02-15 12:01:43 +01:00
parent 30b9653c69
commit cb74bc17be
2 changed files with 15 additions and 12 deletions

View File

@ -10,15 +10,7 @@
:album="item.name" :album="item.name"
class="is-normal mb-5" class="is-normal mb-5"
/> />
<div class="buttons"> <slot v-if="$slots.buttons" name="buttons" />
<a
v-for="button in buttons"
:key="button.label"
v-t="button.label"
class="button is-small"
@click="button.handler"
/>
</div>
<div <div
v-for="property in item.properties?.filter((p) => p.value)" v-for="property in item.properties?.filter((p) => p.value)"
:key="property.label" :key="property.label"
@ -43,7 +35,6 @@ export default {
name: 'ListProperties', name: 'ListProperties',
components: { CoverArtwork }, components: { CoverArtwork },
props: { props: {
buttons: { default: () => [], type: Array },
item: { required: true, type: Object } item: { required: true, type: Object }
} }
} }

View File

@ -1,7 +1,19 @@
<template> <template>
<modal-dialog :actions="actions" :show="show" @close="$emit('close')"> <modal-dialog :actions="actions" :show="show" @close="$emit('close')">
<template #content> <template #content>
<list-properties :buttons="buttons" :item="item" /> <list-properties :item="item">
<template #buttons>
<div class="buttons">
<a
v-for="button in buttons"
:key="button.label"
v-t="button.label"
class="button is-small"
@click="button.handler"
/>
</div>
</template>
</list-properties>
</template> </template>
</modal-dialog> </modal-dialog>
</template> </template>
@ -15,7 +27,7 @@ export default {
name: 'ModalDialogPlayable', name: 'ModalDialogPlayable',
components: { ListProperties, ModalDialog }, components: { ListProperties, ModalDialog },
props: { props: {
buttons: { default: () => [], type: Array }, buttons: { default: null, type: Array },
item: { required: true, type: Object }, item: { required: true, type: Object },
show: Boolean show: Boolean
}, },