Add poster popup, selectable title, collection media previews and library toggles
- Collection edit dialog shows the current poster and backdrop when available - Entry details: title is selectable (action row no longer overlays it) - Entry details: clicking the poster opens it full size in a dialog - Library: Favorites and Hidden are toggles that combine with the type tabs
This commit is contained in:
1 parent
c74e54bc2a
commit
834e02e76b
6 files changed
+258
-114
No files matched your search
@@ -63,6 +63,7 @@ import {
|
||||
import { EntryDetailsSkeleton } from "@/components/skeletons/PageSkeletons";
|
||||
import {
|
||||
getPosterUrl,
|
||||
getFullPosterUrl,
|
||||
getBackdropUrl,
|
||||
getCollectionBackdropUrl,
|
||||
getYear,
|
||||
@@ -135,6 +136,7 @@ export function EntryDetailsPage() {
|
||||
const [showWatchHistoryDialog, setShowWatchHistoryDialog] = useState(false);
|
||||
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
|
||||
const [showStatusDialog, setShowStatusDialog] = useState(false);
|
||||
const [showPosterDialog, setShowPosterDialog] = useState(false);
|
||||
const [editSeenRecord, setEditSeenRecord] = useState<EntrySeen | null>(null);
|
||||
|
||||
// Track recently viewed for command palette
|
||||
@@ -188,11 +190,16 @@ export function EntryDetailsPage() {
|
||||
|
||||
{/* Main content */}
|
||||
<div className="mx-auto max-w-4xl">
|
||||
{/* Action buttons — top right */}
|
||||
<div className="flex justify-end gap-1 -mt-10 relative z-10 mb-2">
|
||||
{/* Action buttons — top right. The row overlaps the title below, so
|
||||
only the button itself takes pointer events. */}
|
||||
<div className="flex justify-end gap-1 -mt-10 relative z-10 mb-2 pointer-events-none">
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" size="icon" className="h-9 w-9">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-9 w-9 pointer-events-auto"
|
||||
>
|
||||
<MoreHorizontal className="h-4 w-4" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
@@ -280,13 +287,18 @@ export function EntryDetailsPage() {
|
||||
<div className="flex flex-col gap-6 relative items-start sm:flex-row sm:gap-8 sm:-mt-8">
|
||||
{/* LEFT: Sticky poster */}
|
||||
<div className="sm:sticky sm:top-20 w-32 sm:w-44 shrink-0 self-start mx-auto sm:mx-0">
|
||||
<div className="relative">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowPosterDialog(true)}
|
||||
className="relative block w-full cursor-zoom-in rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
||||
aria-label="View full-size poster"
|
||||
>
|
||||
<img
|
||||
src={poster}
|
||||
alt={e.title}
|
||||
className="w-full aspect-2/3 rounded-xl object-cover shadow-2xl ring-1 ring-border/50"
|
||||
/>
|
||||
</div>
|
||||
</button>
|
||||
{/* External links */}
|
||||
{e.entryIds && (
|
||||
<div className="flex items-center justify-center gap-3 mt-3">
|
||||
@@ -320,7 +332,9 @@ export function EntryDetailsPage() {
|
||||
<div className="flex-1 min-w-0 space-y-4">
|
||||
{/* Title + director */}
|
||||
<div className="space-y-1">
|
||||
<h1 className="text-3xl font-bold leading-tight">{e.title}</h1>
|
||||
<h1 className="text-3xl font-bold leading-tight select-text">
|
||||
{e.title}
|
||||
</h1>
|
||||
{director?.people?.name && (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
by{" "}
|
||||
@@ -642,6 +656,17 @@ export function EntryDetailsPage() {
|
||||
}}
|
||||
/>
|
||||
|
||||
<Dialog open={showPosterDialog} onOpenChange={setShowPosterDialog}>
|
||||
<DialogContent className="w-auto max-w-[calc(100%-2rem)] sm:max-w-[calc(100%-2rem)] p-0 bg-transparent ring-0 overflow-hidden">
|
||||
<DialogTitle className="sr-only">{e.title} poster</DialogTitle>
|
||||
<img
|
||||
src={getFullPosterUrl(e)}
|
||||
alt={e.title}
|
||||
className="max-h-[90vh] max-w-full w-auto rounded-xl object-contain shadow-2xl"
|
||||
/>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
<Dialog open={showStatusDialog} onOpenChange={setShowStatusDialog}>
|
||||
<DialogContent className="sm:max-w-xs">
|
||||
<DialogHeader>
|
||||
|
||||
Reference in new issue
Block a user