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} /> + {#if running} Rendere… {:else} - + An mir anprobieren - {estimatedCredits} Credits + {estimatedCredits} Credits {/if} 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} /> + {#if running} Rendere… {:else} - + Anprobieren - {estimatedCredits} Credits + {estimatedCredits} Credits {/if} 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]} + - {/if} - + + {:else} + + {/if} @@ -120,14 +154,19 @@ {garment.name} {CATEGORY_LABELS[garment.category]} + (editing = true)} aria-label="Bearbeiten" - title="Bearbeiten" - class="flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground" + class="flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:border-primary/50 hover:bg-primary/5 hover:text-foreground" > - + + Bearbeiten @@ -195,23 +234,26 @@ - + {markingWorn ? 'Gespeichert…' : 'Heute getragen'} - + {garment.isArchived ? 'Wieder aktiv' : 'Archivieren'} @@ -219,7 +261,7 @@ Löschen
{CATEGORY_LABELS[garment.category]}