refactor(ui): unify Channels + Stats filter chips (R13 S2c step 4)
- channel-manager sync-status chips (F2) -> FilterChipGroup (rounded-lg -> the canonical rounded-full), controls-row alignment preserved via className - channel-manager user-tag chips (multi-select) restyled to filterChipClass (rounded-lg -> rounded-full) so the whole manager chip set is one look - stats system time-range chips (F4) -> FilterChipGroup (text-sm -> canonical) Adds aria-label i18n (channels.filters.syncLabel, stats.rangeLabel; HU+EN). Self-E2E'd: sync chips + tag chips rounded-full, view TABS stay rounded-lg (their own canonical), stats 7/30/90d toggles. gate green (tsc/eslint-0/ vitest 136/knip/prettier). Branch not merged.
This commit is contained in:
@@ -9,6 +9,7 @@ import { notify } from "../lib/notifications";
|
||||
import { LS, useAccountPersistedState } from "../lib/storage";
|
||||
import Tooltip from "./Tooltip";
|
||||
import { LoadingState, StateMessage } from "./QueryState";
|
||||
import FilterChipGroup from "./FilterChipGroup";
|
||||
import { Section, SettingRow } from "./ui/form";
|
||||
import { useMe } from "../lib/useMe";
|
||||
|
||||
@@ -228,18 +229,16 @@ function SystemStats() {
|
||||
|
||||
<div className="flex items-center justify-between gap-3 mb-4">
|
||||
<h2 className="text-lg font-semibold">{t("stats.title")}</h2>
|
||||
<div className="flex items-center gap-1">
|
||||
{RANGES.map((d) => (
|
||||
<button
|
||||
key={d}
|
||||
onClick={() => setDays(d)}
|
||||
aria-pressed={days === d}
|
||||
className="pill px-3 py-1.5 rounded-full text-sm border"
|
||||
>
|
||||
{t("stats.rangeDays", { count: d })}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<FilterChipGroup
|
||||
ariaLabel={t("stats.rangeLabel")}
|
||||
className="flex items-center gap-1.5"
|
||||
options={RANGES.map((d) => ({
|
||||
value: String(d),
|
||||
label: t("stats.rangeDays", { count: d }),
|
||||
}))}
|
||||
value={String(days)}
|
||||
onChange={(v) => setDays(Number(v))}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<p className="text-xs text-muted mb-4 leading-relaxed">
|
||||
|
||||
Reference in New Issue
Block a user