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

View File

@ -1,7 +1,19 @@
<template>
<modal-dialog :actions="actions" :show="show" @close="$emit('close')">
<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>
</modal-dialog>
</template>
@ -15,7 +27,7 @@ export default {
name: 'ModalDialogPlayable',
components: { ListProperties, ModalDialog },
props: {
buttons: { default: () => [], type: Array },
buttons: { default: null, type: Array },
item: { required: true, type: Object },
show: Boolean
},