diff --git a/frontend/src/components/ChannelPage.tsx b/frontend/src/components/ChannelPage.tsx index 4488d5b..122772b 100644 --- a/frontend/src/components/ChannelPage.tsx +++ b/frontend/src/components/ChannelPage.tsx @@ -255,6 +255,7 @@ export default function ChannelPage({ onYtSearch={() => {}} onExitYtSearch={() => {}} onOpenChannel={onOpenChannel} + channelScoped /> {!ch?.subscribed && nextToken && (
diff --git a/frontend/src/components/Feed.tsx b/frontend/src/components/Feed.tsx index f7fc781..345a485 100644 --- a/frontend/src/components/Feed.tsx +++ b/frontend/src/components/Feed.tsx @@ -78,6 +78,7 @@ export default function Feed({ onYtSearch, onExitYtSearch, onOpenChannel, + channelScoped, }: { filters: FeedFilters; setFilters: (f: FeedFilters) => void; @@ -95,8 +96,14 @@ export default function Feed({ // Open a channel's dedicated page (from a card's channel name / avatar). Threaded down to // the cards via VirtualFeed. onOpenChannel?: (channelId: string, channelName?: string) => void; + // True when this feed is scoped to a single channel (the channel page). Drops sort options + // that are constant within one channel (subscribers, priority) — they'd be meaningless. + channelScoped?: boolean; }) { const { t } = useTranslation(); + const sortKeys = channelScoped + ? SORT_KEYS.filter((k) => k !== "subscribers" && k !== "priority") + : SORT_KEYS; const [overrides, setOverrides] = useState>({}); const [savedOverrides, setSavedOverrides] = useState>({}); // The open player: which video and where to start (null = resume from saved position). @@ -519,7 +526,7 @@ export default function Feed({ className="bg-card border border-border rounded-lg px-2 py-1.5 text-sm outline-none focus:border-accent" > {/* Relevance only ranks meaningfully when there's a search term — offer it then. */} - {(filters.q.trim() ? (["relevance", ...SORT_KEYS] as SortKey[]) : SORT_KEYS).map((k) => ( + {(filters.q.trim() ? (["relevance", ...sortKeys] as SortKey[]) : sortKeys).map((k) => (