diff --git a/apps/mana/apps/web/src/lib/modules/wardrobe/components/GarmentTryOnButton.svelte b/apps/mana/apps/web/src/lib/modules/wardrobe/components/GarmentTryOnButton.svelte index c7614e769..e5ac75df0 100644 --- a/apps/mana/apps/web/src/lib/modules/wardrobe/components/GarmentTryOnButton.svelte +++ b/apps/mana/apps/web/src/lib/modules/wardrobe/components/GarmentTryOnButton.svelte @@ -163,25 +163,29 @@ disabled={running} /> + diff --git a/apps/mana/apps/web/src/lib/modules/wardrobe/components/TryOnButton.svelte b/apps/mana/apps/web/src/lib/modules/wardrobe/components/TryOnButton.svelte index 1f210734f..bcb624770 100644 --- a/apps/mana/apps/web/src/lib/modules/wardrobe/components/TryOnButton.svelte +++ b/apps/mana/apps/web/src/lib/modules/wardrobe/components/TryOnButton.svelte @@ -160,25 +160,28 @@ disabled={running} /> + diff --git a/apps/mana/apps/web/src/lib/modules/wardrobe/views/DetailGarmentView.svelte b/apps/mana/apps/web/src/lib/modules/wardrobe/views/DetailGarmentView.svelte index eb8ba39f2..e251d7ea6 100644 --- a/apps/mana/apps/web/src/lib/modules/wardrobe/views/DetailGarmentView.svelte +++ b/apps/mana/apps/web/src/lib/modules/wardrobe/views/DetailGarmentView.svelte @@ -42,9 +42,32 @@ let saving = $state(false); let markingWorn = $state(false); - // Lightbox state for the Anproben-Strip. Null = closed, Image = open. + // Lightbox state — shared between the Anproben-Strip (try-on thumbs) + // and the hero-photo. Null = closed, Image = open. let lightboxImage = $state(null); + // The hero-photo is a garment row, not a picture.Image — synthesise + // the shape the lightbox expects so clicking the photo opens the + // full-resolution mana-media URL with the garment's name as + // prompt-caption. No model / dims / date are rendered (all optional + // in the lightbox), keeping the modal clean for a plain clothing + // photo. + function openPhotoLightbox() { + if (!garment || !garment.mediaIds[0]) return; + lightboxImage = { + id: garment.id, + prompt: garment.name, + storagePath: garment.mediaIds[0], + filename: garment.name, + publicUrl: garmentPhotoUrl(garment.mediaIds[0], 'large'), + visibility: 'private', + isFavorite: false, + downloadCount: 0, + createdAt: garment.createdAt, + updatedAt: garment.updatedAt, + }; + } + async function handleMarkWorn() { if (!garment) return; markingWorn = true; @@ -98,16 +121,27 @@ {/if} {:else}
- -
- {#if garment.mediaIds[0]} + + {#if garment.mediaIds[0]} +
+ + {:else} +
+ {/if}
@@ -120,14 +154,19 @@

{garment.name}

{CATEGORY_LABELS[garment.category]}

+ @@ -195,23 +234,26 @@ - + - +