feat(frontend): i18n, theming and account/browser/admin UI updates
- add French-keyed i18n with an English dictionary, plus theme and locale helpers, applied across all pages and components - account page: theme and language selectors and a two-column layout - browser: per-folder media type filters and unread chat badges - admin: audit log filtered by user and action through dropdowns - global API and type updates to match the new backend endpoints
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import type { Language } from "./api";
|
||||
|
||||
/**
|
||||
* Langue d'affichage courante, partagee par tout le module (hors composants
|
||||
* React) : formatage des tailles et des dates. Le provider i18n la met a jour
|
||||
* des qu'un utilisateur change de langue dans son compte.
|
||||
*/
|
||||
let language: Language = "fr";
|
||||
|
||||
export const getLanguage = (): Language => language;
|
||||
|
||||
export const setLanguage = (next: Language): void => {
|
||||
language = next;
|
||||
if (typeof document !== "undefined") document.documentElement.lang = next;
|
||||
};
|
||||
|
||||
export const getLocale = (): string => (language === "en" ? "en-US" : "fr-FR");
|
||||
Reference in New Issue
Block a user