fix(channel): hide the Source (search-results) filter on the channel-scoped feed

The Source selector (organic / include-search / search-only) is a global-catalog
concept — it picks how videos ENTERED the library. On a single channel's page the
view is pinned to librarySource=all and would only offer a near-empty, confusing
slice, so hide the selector there (the main feed keeps it).
This commit is contained in:
npeter83 2026-07-12 16:36:32 +02:00
parent 60174b63c6
commit eef0e870d4

View file

@ -552,25 +552,33 @@ export default function Feed({
</button> </button>
); );
})} })}
<span className="mx-1 h-5 w-px bg-border" aria-hidden="true" /> {/* The Source filter (organic / include-search / search-only) is a global-catalog concept
<label className="inline-flex items-center gap-1.5 text-xs text-muted"> it selects how videos ENTERED the library. On a channel-scoped view we already show all
<span>{t("feed.source.label")}</span> of this one channel's videos (librarySource is pinned to "all"), so the selector would
<select only offer a near-empty, confusing slice hide it here. */}
value={filters.librarySource ?? "organic"} {!channelScoped && (
onChange={(e) => <>
setFilters({ <span className="mx-1 h-5 w-px bg-border" aria-hidden="true" />
...filters, <label className="inline-flex items-center gap-1.5 text-xs text-muted">
librarySource: e.target.value as FeedFilters["librarySource"], <span>{t("feed.source.label")}</span>
}) <select
} value={filters.librarySource ?? "organic"}
title={t("feed.source.tip")} onChange={(e) =>
className="bg-card border border-border rounded-lg px-2 py-1 text-xs outline-none focus:border-accent" setFilters({
> ...filters,
<option value="organic">{t("feed.source.organic")}</option> librarySource: e.target.value as FeedFilters["librarySource"],
<option value="all">{t("feed.source.all")}</option> })
<option value="search">{t("feed.source.only")}</option> }
</select> title={t("feed.source.tip")}
</label> className="bg-card border border-border rounded-lg px-2 py-1 text-xs outline-none focus:border-accent"
>
<option value="organic">{t("feed.source.organic")}</option>
<option value="all">{t("feed.source.all")}</option>
<option value="search">{t("feed.source.only")}</option>
</select>
</label>
</>
)}
<span className="mx-1 h-5 w-px bg-border" aria-hidden="true" /> <span className="mx-1 h-5 w-px bg-border" aria-hidden="true" />
<span className="text-xs text-muted whitespace-nowrap"> <span className="text-xs text-muted whitespace-nowrap">
{countQuery.data {countQuery.data