From 7a109c9ba5b272f14f9819d4fe85bed6950a56be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 5 May 2026 10:16:12 +0200 Subject: [PATCH] Fix portrait photos using thumb for full size variant --- app/components/photo-carousel.gjs | 62 ++++++++++++++++++++++--------- app/components/photo-gallery.gjs | 2 +- 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/app/components/photo-carousel.gjs b/app/components/photo-carousel.gjs index c4ffa07..866e764 100644 --- a/app/components/photo-carousel.gjs +++ b/app/components/photo-carousel.gjs @@ -33,6 +33,14 @@ export default class PhotoCarousel extends Component { return !this.canScrollRight; } + get isGalleryMain() { + return this.args.variant === 'gallery-main'; + } + + get isGalleryThumbnails() { + return this.args.variant === 'gallery-thumbnails'; + } + get variantClass() { return this.args.variant || 'inline'; } @@ -205,29 +213,47 @@ export default class PhotoCarousel extends Component { /> {{/if}} - {{#if photo.isLandscape}} - - {{#if photo.thumbUrl}} - - {{/if}} - {{@name}} - - {{else}} - {{! Portrait uses thumb everywhere if available }} + {{#if this.isGalleryMain}} + {{@name}} + {{else if this.isGalleryThumbnails}} {{@name}} + {{else}} + {{#if photo.isLandscape}} + + {{#if photo.thumbUrl}} + + {{/if}} + {{@name}} + + {{else}} + {{! Portrait uses thumb everywhere if available }} + {{@name}} + {{/if}} {{/if}} {{/each}} diff --git a/app/components/photo-gallery.gjs b/app/components/photo-gallery.gjs index 3449a3d..7bf9aca 100644 --- a/app/components/photo-gallery.gjs +++ b/app/components/photo-gallery.gjs @@ -80,7 +80,7 @@ export default class PhotoGallery extends Component { class="dropdown-item" type="button" {{on "click" (fn this.copyEventId closeMenu)}} - >Copy Nostr Event ID + >Copy Photo Event ID