Gallery cover url (#5182)

* Add default gallery image
* Add gallery cover URL path
* Use new cover URL in UI
* Hide gallery preview scrubber when gallery has no images
* Don't try to show lightbox for gallery without images
* Ignore unrelated lint issue
This commit is contained in:
WithoutPants
2024-09-03 16:31:55 +10:00
committed by GitHub
parent 010a355e0b
commit a3c34a51aa
14 changed files with 131 additions and 49 deletions

View File

@@ -25,6 +25,9 @@ type ImageFinder interface {
type ImageQueryer interface {
Query(ctx context.Context, options ImageQueryOptions) (*ImageQueryResult, error)
QueryCount(ctx context.Context, imageFilter *ImageFilterType, findFilter *FindFilterType) (int, error)
}
type GalleryCoverFinder interface {
CoverByGalleryID(ctx context.Context, galleryId int) (*Image, error)
}
@@ -73,6 +76,8 @@ type ImageReader interface {
TagIDLoader
FileLoader
GalleryCoverFinder
All(ctx context.Context) ([]*Image, error)
Size(ctx context.Context) (float64, error)
}