/** * @file Administration.tsx * @description The Administration page (`/admin`, a sidebar item; `/users` * redirects here), server mode only and only for an admin or analyst — ONE * page, no tabs: ONE users table holding every per-user account fact (account, * spend, home, tmux; each row expands in * place into that user's detail), the account pool, then the audit log — all * from `Users.tsx`. The machine and each user's live CPU / RAM live on the * Dashboard's System Health tab (`HostHealth.tsx`). Local mode and a developer are sent home, like the * Users page always did. * @author Nguyễn Ngọc Trí Vĩ */ import { Navigate } from "react-router-dom"; import { useTranslation } from "react-i18next"; import { ShieldCheck } from "lucide-react"; import { useAuth } from "../components/AuthGate"; import { useHostStats } from "../components/health/HostHealth"; import { Users } from "./Users"; export function Administration() { const { t } = useTranslation("admin"); const auth = useAuth(); const me = auth.state.mode === "server" ? auth.state.user : null; const staff = !!me && me.role !== "developer"; // Read once, for each home's share of the homes disk. The machine and each // user's live CPU / RAM are on the Dashboard's System Health tab. const host = useHostStats(staff, 0); if (!staff) return ; return (

{t("title")}

{t("description")}

); }