Repository Public
1"use client";2import type { ReactNode } from "react";3import { useI18n } from "@/i18n";4import { useTheme } from "@/shell/theme";5import { Button } from "@/ui";67export function PublicFrame({ children }: { children: ReactNode }) {8 const { t, locale, setLocale } = useI18n();9 const { theme, setTheme } = useTheme();10 return (11 <div className="public">12 <header className="public-top">13 <span className="app-brand" aria-hidden="true">14 <svg className="mark" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.75"><rect x="3" y="3" width="7.5" height="7.5" rx="1.5" /><rect x="13.5" y="3" width="7.5" height="7.5" rx="1.5" /><rect x="3" y="13.5" width="7.5" height="7.5" rx="1.5" /><path d="M13.5 17.25h7.5M17.25 13.5V21" /></svg>15 <span>MacLustr<small>Command Center</small></span>16 </span>17 <div className="row">18 <Button variant="ghost" size="sm" icon="globe" onClick={() => setLocale(locale === "fr" ? "en" : "fr")} lang={locale === "fr" ? "en" : "fr"} data-testid="public-locale">{locale === "fr" ? "English" : "Français"}</Button>19 <Button variant="ghost" size="sm" icon={theme === "dark" ? "sun" : "moon"} onClick={() => setTheme(theme === "dark" ? "light" : "dark")}>{theme === "dark" ? t("shell.account.toLight") : t("shell.account.toDark")}</Button>20 </div>21 </header>22 <main className="public-main" id="main">{children}</main>23 <footer className="public-foot">{t("auth.footer")}</footer>24 </div>25 );26}27