#6404 fix: add messages to FileUpload templates

pull/6417/head
Andrew Russell 2024-09-17 10:15:12 +02:00
parent 76b3f41189
commit b132b801c2
1 changed files with 15 additions and 3 deletions

View File

@ -16,8 +16,12 @@
</ProgressBar> </ProgressBar>
</div> </div>
</template> </template>
<template #content="{ files, uploadedFiles, removeUploadedFileCallback, removeFileCallback }"> <template #content="{ files, uploadedFiles, removeUploadedFileCallback, removeFileCallback, messages }">
<div class="flex flex-col gap-8 pt-4"> <div class="flex flex-col gap-8 pt-4">
<Message v-for="message of messages" :key="message" :class="{'mb-8': !files.length && !uploadedFiles.length}" severity="error">
{{ message }}
</Message>
<div v-if="files.length > 0"> <div v-if="files.length > 0">
<h5>Pending</h5> <h5>Pending</h5>
<div class="flex flex-wrap gap-4"> <div class="flex flex-wrap gap-4">
@ -82,8 +86,12 @@ export default {
</ProgressBar> </ProgressBar>
</div> </div>
</template> </template>
<template #content="{ files, uploadedFiles, removeUploadedFileCallback, removeFileCallback }"> <template #content="{ files, uploadedFiles, removeUploadedFileCallback, removeFileCallback, messages }">
<div class="flex flex-col gap-8 pt-4"> <div class="flex flex-col gap-8 pt-4">
<Message v-for="message of messages" :key="message" :class="{'mb-8': !files.length && !uploadedFiles.length}" severity="error">
{{ message }}
</Message>
<div v-if="files.length > 0"> <div v-if="files.length > 0">
<h5>Pending</h5> <h5>Pending</h5>
<div class="flex flex-wrap gap-4"> <div class="flex flex-wrap gap-4">
@ -140,8 +148,12 @@ export default {
</ProgressBar> </ProgressBar>
</div> </div>
</template> </template>
<template #content="{ files, uploadedFiles, removeUploadedFileCallback, removeFileCallback }"> <template #content="{ files, uploadedFiles, removeUploadedFileCallback, removeFileCallback, messages }">
<div class="flex flex-col gap-8 pt-4"> <div class="flex flex-col gap-8 pt-4">
<Message v-for="message of messages" :key="message" :class="{'mb-8': !files.length && !uploadedFiles.length}" severity="error">
{{ message }}
</Message>
<div v-if="files.length > 0"> <div v-if="files.length > 0">
<h5>Pending</h5> <h5>Pending</h5>
<div class="flex flex-wrap gap-4"> <div class="flex flex-wrap gap-4">