From 12d17ec7b0377c9ab44cee8d1768874b208e4a02 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Sun, 19 Jul 2026 04:31:02 +0200 Subject: [PATCH] polish(plex): match the feed rail's segmented-pill look for the any/all toggle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The genre + actor MATCH toggles were a boxed button row (rounded-lg border, no track); restyle them as the feed rail's tag-match toggle — a rounded-full track (border + bg-card + p-0.5) with an inset rounded-full active pill, plus a MATCH label. Extracted a shared MatchToggle so both read identically. i18n plex.filter.matchLabel (en/hu). (Plex cast-explore polish) --- frontend/src/components/PlexSidebar.tsx | 75 +++++++++++++++---------- frontend/src/i18n/locales/en/plex.json | 3 +- frontend/src/i18n/locales/hu/plex.json | 3 +- 3 files changed, 50 insertions(+), 31 deletions(-) diff --git a/frontend/src/components/PlexSidebar.tsx b/frontend/src/components/PlexSidebar.tsx index 744f5b42..824bfa61 100644 --- a/frontend/src/components/PlexSidebar.tsx +++ b/frontend/src/components/PlexSidebar.tsx @@ -33,6 +33,43 @@ const DURATION_BUCKETS: { key: string; min: number | null; max: number | null }[ { key: "long", min: 120 * 60, max: null }, ]; +// The any/all combine toggle for a multi-value filter (genres, actors). Same segmented-pill look as +// the feed rail's tag MATCH toggle (rounded-full track + inset active pill), not a boxed button row. +function MatchToggle({ + mode, + onChange, +}: { + mode: "any" | "all"; + onChange: (m: "any" | "all") => void; +}) { + const { t } = useTranslation(); + return ( +
+ + {t("plex.filter.matchLabel")} + +
+ {(["any", "all"] as const).map((m) => ( + + ))} +
+
+ ); +} + export default function PlexSidebar({ layout, setLayout, @@ -212,20 +249,11 @@ export default function PlexSidebar({ /> ))} {filters.actors.length > 1 && ( -
- {(["any", "all"] as const).map((m) => ( - - ))} +
+ patch({ actorMode: m })} + />
)} {filters.actors.map((a) => ( @@ -312,21 +340,10 @@ export default function PlexSidebar({ body: ( <> {filters.genres.length > 1 && ( -
- {(["any", "all"] as const).map((m) => ( - - ))} -
+ patch({ genreMode: m })} + /> )} {facets.genres.map((g) => ( diff --git a/frontend/src/i18n/locales/en/plex.json b/frontend/src/i18n/locales/en/plex.json index 9f016131..6c06b02a 100644 --- a/frontend/src/i18n/locales/en/plex.json +++ b/frontend/src/i18n/locales/en/plex.json @@ -57,7 +57,8 @@ }, "collection": "Collection", "collectionSearch": "Search collections…", - "collectionEmpty": "No collections" + "collectionEmpty": "No collections", + "matchLabel": "Match" }, "count": "{{count}} titles", "searchCount": "{{count}} matches", diff --git a/frontend/src/i18n/locales/hu/plex.json b/frontend/src/i18n/locales/hu/plex.json index c91be3a0..92809e5e 100644 --- a/frontend/src/i18n/locales/hu/plex.json +++ b/frontend/src/i18n/locales/hu/plex.json @@ -57,7 +57,8 @@ }, "collection": "Kollekció", "collectionSearch": "Kollekciók keresése…", - "collectionEmpty": "Nincs kollekció" + "collectionEmpty": "Nincs kollekció", + "matchLabel": "Egyezés" }, "count": "{{count}} cím", "searchCount": "{{count}} találat",