feat(design): a Plex title's one action list (C1) — the poster's "…", details and the pin in its menu (E28 S3e2)
Every Plex poster list (library, Discover rails, person, show, season, collection, Home's rails) now opens one menu per list from the right-click, the long-press, Shift+F10 and the card's "…": play/open, watched, add to playlist, media info, copy title, the pin (usePlexCardActions + PlexMenu, replacing the pin-only PlexPinMenu). The card keeps its state at rest and shows watched / add to playlist / "…" on its picture on hover (ui/reveal.ts, shared with the video card); on touch the toggles are gone and a 44px "…" sits beside the title, while the watched pill stays. The hover ⓘ left the card; an episode's add button moved from its caption to the hover row. Seasons get their own short menu (open, watched, add, copy), labelled "Open season" (the card's overlay said "Open show"). Related shows are ordinary poster cards now. A collection's admin "Remove" X moved into its menu, still behind the confirmation. The collection grid is two columns on a phone. The unused .reveal-idle rule is gone.
This commit is contained in:
@@ -10,8 +10,9 @@ import { toggleWatchState } from "../lib/plexWatch";
|
||||
import { usePlex } from "./plexContext";
|
||||
import { Carousel } from "./ui/Carousel";
|
||||
import { PlexPosterCard } from "./plexCards";
|
||||
import { PlexPinMenu } from "./ComfortPinMenu";
|
||||
import { PlexMenu } from "./PlexMenu";
|
||||
import { useContextMenu } from "./ui/useContextMenu";
|
||||
import { usePlexCardActions } from "./usePlexCardActions";
|
||||
import { LoadingState, StateMessage } from "./ui/QueryState";
|
||||
import NavGrid from "./ui/NavGrid";
|
||||
import { IconButton } from "./ui/IconButton";
|
||||
@@ -44,8 +45,12 @@ function CardRail({
|
||||
onToggleWatched: (c: PlexCard) => void;
|
||||
action?: ReactNode; // optional header control (e.g. the Surprise-me reshuffle button)
|
||||
}) {
|
||||
// One comfort-pin menu per rail (see ui/ContextMenu), not one per poster.
|
||||
const pinMenu = useContextMenu<PlexCard>();
|
||||
// One menu per rail (see ui/ContextMenu), not one per poster.
|
||||
const menu = useContextMenu<PlexCard>();
|
||||
const actions = usePlexCardActions(
|
||||
{ onOpen: onOpenCard, onInfo: onInfoCard, onToggleWatched },
|
||||
menu.open,
|
||||
);
|
||||
const heading =
|
||||
action != null ? (
|
||||
<span className="inline-flex items-center gap-2">
|
||||
@@ -70,14 +75,16 @@ function CardRail({
|
||||
card={c}
|
||||
navIndex={i}
|
||||
onOpen={() => onOpenCard(c)}
|
||||
onInfo={() => onInfoCard(c)}
|
||||
onToggleWatched={onToggleWatched}
|
||||
menuProps={pinMenu.triggerProps}
|
||||
onAdd={actions.add}
|
||||
menuProps={menu.triggerProps}
|
||||
menuButtonProps={menu.buttonProps}
|
||||
menuOpen={menu.open && menu.target === c}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</Carousel>
|
||||
<PlexPinMenu menu={pinMenu} />
|
||||
<PlexMenu menu={menu} actions={actions} />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user