feat(home): tap opens detail, long-press plays from home cards

Home carousel cards route a tap to the item's detail / Episode Focus
View and a ~500ms long-press to a confirm-then-play flow. MediaCard gains
an onLongPress prop with pointer-based detection (cancelled on >10px move
so carousel scroll is unaffected, trailing click suppressed). Episode
taps route to /library/<seriesId>?episode=<id>; the bare-episode detail
page links back to its parent series/season.

TRACES: UR-058 | DR-087
This commit is contained in:
2026-07-24 23:49:03 +02:00
parent e2c9d68311
commit 589f08b873
4 changed files with 136 additions and 17 deletions
+3 -1
View File
@@ -7,10 +7,11 @@
title: string;
items: MediaItem[];
onItemClick?: (item: MediaItem) => void;
onItemLongPress?: (item: MediaItem) => void;
showAll?: () => void;
}
let { title, items, onItemClick, showAll }: Props = $props();
let { title, items, onItemClick, onItemLongPress, showAll }: Props = $props();
let scrollContainer: HTMLDivElement | null = $state(null);
let showLeftArrow = $state(false);
@@ -60,6 +61,7 @@
size="medium"
showProgress={true}
onclick={() => onItemClick?.(item)}
onLongPress={onItemLongPress ? () => onItemLongPress(item) : undefined}
/>
{/each}
</div>