feat(feed): 1D — content-type chips + sort in a toolbar above the cards

Move content type and ordering out of the filter sidebar into a feed toolbar (approved
proposal 2): a prominent content-type chip row (Normal/Shorts/Live toggle chips) with the
sort control + count + reshuffle in a quieter row beneath it. The toolbar renders even on
'no matches' so content-type can be turned back on after it filtered everything out. The
sidebar keeps Show / Upload date / Language / Topic; 'sort' and 'content' widgets removed
from the layout (normalizeLayout drops them from any saved layout). New feed.sortLabel
string (HU/EN/DE).
This commit is contained in:
npeter83 2026-06-16 02:34:13 +02:00
parent abe296d19d
commit 1d5301509c
6 changed files with 95 additions and 84 deletions

View file

@ -2,22 +2,15 @@
// collapsed, and which are hidden. Persisted to localStorage and the server-side
// `preferences` blob so it follows the account.
export type WidgetId = "show" | "sort" | "date" | "content" | "language" | "topic";
// `sort` and `content` moved to the feed toolbar (above the cards); they are no longer
// sidebar widgets. normalizeLayout drops them from any persisted layout automatically.
export type WidgetId = "show" | "date" | "language" | "topic";
export const ALL_WIDGETS: WidgetId[] = [
"show",
"sort",
"date",
"content",
"language",
"topic",
];
export const ALL_WIDGETS: WidgetId[] = ["show", "date", "language", "topic"];
export const WIDGET_TITLES: Record<WidgetId, string> = {
show: "Show",
sort: "Sort",
date: "Upload date",
content: "Content type",
language: "Language",
topic: "Topic",
};