Show a warning if they will replace the images on the report

This commit is contained in:
Eli Ribble 2026-04-12 16:44:20 +00:00
parent ab47259534
commit 875298fe88
No known key found for this signature in database
2 changed files with 10 additions and 14 deletions

View file

@ -113,20 +113,15 @@
<ImageUpload v-model="images" />
</div>
<!-- Photo Previews -->
<div id="photo-previews" class="mb-4">
<!-- Thumbnails will be dynamically added here -->
<div class="row g-2" id="preview-container" style="display: none">
<!-- Example preview structure (hidden by default, shown when photos added):
<div class="col-4">
<div class="photo-preview">
<img src="..." alt="Preview">
<button type="button" class="remove-btn" data-index="0">
<i class="bi bi-x-lg"></i>
</button>
</div>
</div>
-->
<div class="mb-4" v-if="modelValue.images.length > 0">
<div class="alert alert-primary" role="alert">
You've already added {{ modelValue.images.length }} image{{
modelValue.images.length == 1 ? "" : "s"
}}
to this report. If you add images below, they will replace the image{{
modelValue.images.length == 1 ? "" : "s"
}}
already on this report.
</div>
</div>

View file

@ -152,6 +152,7 @@ async function fetchExistingReport(report_uri: string) {
}
const body = await resp.json();
report.value.id = body.id;
report.value.images = body.images;
report.value.uri = body.uri;
report.value.address = body.address;
isLoading.value = false;