2024-12-01 17:56:31 +01:00
|
|
|
<template>
|
|
|
|
|
<!-- [&:has(>:last-child:nth-child(1))] means "when this element has 1 child" -->
|
2025-12-09 22:32:22 +01:00
|
|
|
<div
|
|
|
|
|
class="grid gap-4 grid-cols-2 *:max-h-56 [&:has(>:last-child:nth-child(1))]:grid-cols-1 sm:[&:has(>:last-child:nth-child(1))>*]:max-h-72"
|
|
|
|
|
>
|
|
|
|
|
<Attachment
|
|
|
|
|
v-for="attachment in attachments"
|
|
|
|
|
:key="attachment.id"
|
|
|
|
|
:attachment="attachment"
|
|
|
|
|
/>
|
2024-12-01 17:56:31 +01:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2025-05-26 11:19:15 +02:00
|
|
|
import type { Attachment as AttachmentType } from "@versia/client/schemas";
|
|
|
|
|
import type { z } from "zod";
|
2024-12-01 17:56:31 +01:00
|
|
|
import Attachment from "./attachment.vue";
|
|
|
|
|
|
|
|
|
|
defineProps<{
|
2025-05-26 11:19:15 +02:00
|
|
|
attachments: z.infer<typeof AttachmentType>[];
|
2024-12-01 17:56:31 +01:00
|
|
|
}>();
|
2024-12-31 15:28:05 +01:00
|
|
|
</script>
|