Fix collection images and entry settings toggles
- Show the uploaded backdrop on the collection details page; it only looked at the TMDB backdrop and ignored the collection's media - Fall back to the first entry's poster for collections without a poster on both the collections grid and the details page - Read the live entry from the library store in EntrySettingsDialog so toggles reflect the new value instead of a stale prop snapshot
This commit is contained in:
1 parent
a9e4eea856
commit
72600cbc5d
4 files changed
+73
-21
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useRef, useEffect } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { getCollectionPosterUrl } from "@/lib/media-utils";
|
||||
import { getCollectionDisplayPosterUrl } from "@/lib/collection-media";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import type { Collection } from "@/types";
|
||||
|
||||
@@ -16,7 +16,7 @@ export function CollectionCard({ collection }: CollectionCardProps) {
|
||||
>
|
||||
<div className="relative aspect-[2/3] w-full overflow-hidden rounded-lg bg-muted">
|
||||
<img
|
||||
src={getCollectionPosterUrl(collection)}
|
||||
src={getCollectionDisplayPosterUrl(collection)}
|
||||
alt={collection.name}
|
||||
className="h-full w-full object-cover transition-transform group-hover:scale-105"
|
||||
loading="lazy"
|
||||
|
||||
Reference in new issue
Block a user