feat(settings): a time-format preference and one home for insight pills

The clock format followed the UI language with no way out — an English
interface forced AM/PM everywhere. A new profile preference (automatic,
24-hour, 12-hour) feeds every formatter through the shared locale
context, persists on the user row and rides the profile endpoints. The
insight pill list in settings gains the same eye toggle the overview
tiles have, so ordering and visibility live in one place; the page-side
'manage detail pages' block folds into a link there. Includes the
locale bundles for both features and the regenerated API contract.
This commit is contained in:
Marc-André Bombeck committed 2026-06-10 13:34:46 +02:00
1 parent 3cf48fa0f1
commit aabc7915cb
28 files changed
+1137 -462

No files matched your search

+5 -1
View File
@@ -24,6 +24,7 @@
*/
import { makeFormatters } from "./format-locale";
import { readStoredTimeFormat } from "./time-format";
import { locales, type Locale } from "./i18n/config";
function isLocale(value: string | null | undefined): value is Locale {
@@ -45,7 +46,10 @@ function activeLocale(): Locale {
}
function formatters() {
return makeFormatters(activeLocale());
// Honour the mirrored hour-cycle preference so these legacy helpers render
// the same clock as `useFormatters()` call sites. SSR reads AUTO — same
// post-hydration caveat as `activeLocale()` above.
return makeFormatters(activeLocale(), undefined, readStoredTimeFormat());
}
/** Locale-aware "19.02.2026, 14:30" or "02/19/2026, 2:30 PM". */