adds photo upload for summit logs

This commit is contained in:
Christian Beutel
2024-11-30 18:34:48 +01:00
parent 8f8d28ef7a
commit 1ad7fb3820
20 changed files with 314 additions and 366 deletions

View File

@@ -15,6 +15,7 @@
$: if (waypoint.photos?.length) {
imgSrc = waypoint.photos
.filter((_, i) => i < 3)
.reverse()
.map((p) => getFileURL(waypoint, p));
} else if (waypoint._photos?.length && browser) {
Promise.all(
@@ -37,7 +38,7 @@
</script>
<div
class="flex gap-4 p-4 border border-input-border rounded-md my-2 hover:bg-menu-item-background-hover"
class="flex gap-4 p-4 outline outline-1 outline-input-border rounded-md my-2 hover:outline-2"
>
{#if imgSrc.length}
{#if mode == "show"}

View File

@@ -120,11 +120,11 @@
></TextField>
</div>
<div>
<label for="trail-photo-input" class="text-sm font-medium pb-1">
<label for="waypoint-photo-input" class="text-sm font-medium pb-1">
{$_("photos")}
</label>
<PhotoPicker
id="waypoint"
id="waypoint-photo-input"
parent={$form}
on:exif={(e) => getCoordinatesFromPhoto(e.detail)}
bind:photos={$form.photos}