Add language picker to admin sidebar and topbar.
Local Build and Deploy / deploy (push) Successful in 55s

Reuse LanguageSwitcher with an admin-styled dropdown next to the theme toggle.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-15 21:33:11 +02:00
1 parent 1e3eb86495
commit 94904f2ddb
2 files changed
+50 -28

No files matched your search

+5
View File
@@ -6,6 +6,7 @@ import type { ReactNode } from "react";
import { AdminHubChrome } from "@/components/admin/admin-hub-chrome"; import { AdminHubChrome } from "@/components/admin/admin-hub-chrome";
import { AdminMobileWrapper } from "@/components/admin/admin-mobile-wrapper"; import { AdminMobileWrapper } from "@/components/admin/admin-mobile-wrapper";
import { AdminNavLink } from "@/components/admin/admin-nav-link"; import { AdminNavLink } from "@/components/admin/admin-nav-link";
import { LanguageSwitcher } from "@/components/language-switcher";
import { ThemeSwitcher } from "@/components/theme-switcher"; import { ThemeSwitcher } from "@/components/theme-switcher";
import { requireStaff } from "@/lib/admin/guard"; import { requireStaff } from "@/lib/admin/guard";
import { ADMIN_NAV_GROUPS } from "@/lib/admin-nav"; import { ADMIN_NAV_GROUPS } from "@/lib/admin-nav";
@@ -74,8 +75,11 @@ async function Sidebar({
{t("rankLabel", { rank: staff.rank })} {t("rankLabel", { rank: staff.rank })}
</span> </span>
</div> </div>
<div className="flex items-center gap-1.5 shrink-0">
<LanguageSwitcher variant="admin" />
<ThemeSwitcher variant="admin" /> <ThemeSwitcher variant="admin" />
</div> </div>
</div>
<nav className="flex-1 overflow-y-auto px-3 py-4"> <nav className="flex-1 overflow-y-auto px-3 py-4">
{ADMIN_NAV_GROUPS.map((group, gi) => { {ADMIN_NAV_GROUPS.map((group, gi) => {
@@ -143,6 +147,7 @@ async function Topbar({
</span> </span>
</div> </div>
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<LanguageSwitcher variant="admin" />
<ThemeSwitcher variant="admin" /> <ThemeSwitcher variant="admin" />
<span className="text-xs text-[var(--admin-text-muted)]"> <span className="text-xs text-[var(--admin-text-muted)]">
<strong className="text-[var(--admin-text)]">{staff.username}</strong> <strong className="text-[var(--admin-text)]">{staff.username}</strong>
File diff suppressed because it is too large. Load diff