kanban > virtual sample step : fix image for pdf

This commit is contained in:
isUnknown 2024-12-20 10:55:33 +01:00
parent 8c0a347d2c
commit c1328c9150
2 changed files with 9 additions and 1 deletions

View file

@ -12,7 +12,8 @@
:data-plus="images.length > 3 ? images.length - 3 : undefined"
>
<template v-for="image in images.slice(0, 3)" :key="image.uuid">
<img :src="image.url" :alt="image.alt" />
<img v-if="image.url" :src="image.url" :alt="image.alt" />
<div v-else class="card__images" data-icon="document"></div>
</template>
</figure>
<!-- <footer

View file

@ -12,6 +12,13 @@ import { computed } from "vue";
const { step } = defineProps({ step: Object });
const images = computed(() => {
if (!step.files.dynamic) {
return [
{
url: step.files.static.rawGlass.cover,
},
];
}
return step.files?.dynamic?.map((track) => getFrontView(track)) ?? [];
});