feat(feed): Show chips in the toolbar + key+direction sort

1) Move the Show view filter (Unwatched/In progress/All/Watched/Hidden) up into the
   toolbar chip row as its own single-select group, divided from the content-type chips;
   removed the 'show' sidebar widget (sidebar now = Upload date / Language / Topic).
2) Rework ordering like the Playlists page: a sort-key dropdown (Date, Popular, Duration,
   Name, Channel subscribers, Channel priority, Surprise me) + a single asc/desc arrow
   toggle, instead of separate directional entries. 'Most viewed' is now 'Popular'.
   Backend gains the missing directions (views_asc, title_desc, subscribers_asc,
   priority_asc); the frontend maps (key, dir) -> the backend sort string, so FeedFilters
   is unchanged. Trilingual (feed.sortKey.*, feed.dirAsc/dirDesc). Feed.tsx normalized to LF.
This commit is contained in:
npeter83 2026-06-16 02:46:26 +02:00
parent a44bdf7fdc
commit 4921a95d09
7 changed files with 115 additions and 46 deletions

View file

@ -214,7 +214,6 @@ export default function Sidebar({
}
const available: Record<WidgetId, boolean> = {
show: true,
date: true,
language: languages.length > 0,
topic: topics.length > 0,
@ -237,24 +236,6 @@ export default function Sidebar({
function widgetBody(id: WidgetId): React.ReactNode {
switch (id) {
case "show":
return (
<div className="grid grid-cols-2 gap-1.5">
{SHOW_IDS.map((id) => (
<button
key={id}
onClick={() => setFilters({ ...filters, show: id })}
className={`text-xs py-1.5 rounded-lg border shadow-sm active:translate-y-px transition ${
filters.show === id
? "bg-accent text-accent-fg border-accent"
: "bg-card border-border hover:border-accent"
}`}
>
{t("sidebar.show." + id)}
</button>
))}
</div>
);
case "date":
return (
<>