Admin

Upload New Photo

{ handleSubmit(); if (thumbnailBlob) { formData.append("thumbnail", thumbnailBlob, "thumbnail.jpg"); } return async ({ result, update }) => { isLoading = false; if (result.type === "success") { resetUploadForm(); } await update(); }; }} class="space-y-4" >
{#if previewUrl}
Preview
{#if date || camera || lens}
{#if date}

{date}

{/if} {#if make || camera}

{[make, camera].filter(Boolean).join(" ")}

{/if} {#if lens}

{lens}

{/if} {#if aperture || exposure || focalLength || iso}

{[aperture, exposure, focalLength, iso ? `ISO ${iso}` : ""].filter(Boolean).join(" | ")}

{/if}
{/if}
{/if} {#if form?.error}

{form.error}

{/if}
{#if data.photos.length > 0}

Photos ({data.photos.length})

{#each data.photos as photo (photo.id)}
{photo.title}
{#if editingId === photo.id}
{ return async ({ update }) => { editingId = null; await update(); }; }} class="flex items-center gap-2" >
{:else}

{photo.title}

{photo.date}

{/if}
{#if editingId !== photo.id}
{#if deleteConfirmId === photo.id}
{ return async ({ update }) => { deleteConfirmId = null; await update(); }; }} class="flex items-center gap-1" >
{:else} {/if}
{/if}
{/each}
{/if}