From c6fe94450b5e3335ebd37283c70083dfa6d05dc7 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Wed, 1 Jul 2026 22:50:59 +0200 Subject: [PATCH] feat(nav): current-language badge (HU/EN/DE) on the rail language switcher The icon-only rail switcher now shows the active language code as a small corner badge, so the current language reads at a glance without opening the menu. --- frontend/src/components/LanguageSwitcher.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/LanguageSwitcher.tsx b/frontend/src/components/LanguageSwitcher.tsx index 598f3d6..eaaf244 100644 --- a/frontend/src/components/LanguageSwitcher.tsx +++ b/frontend/src/components/LanguageSwitcher.tsx @@ -92,9 +92,14 @@ export default function LanguageSwitcher({ onClick={toggleRail} title={current.label} aria-label={current.label} - className="p-2 rounded-lg text-muted hover:text-fg hover:bg-card transition" + className="relative p-2 rounded-lg text-muted hover:text-fg hover:bg-card transition" > + {/* Current-language badge (HU/EN/DE) so the active language reads at a glance without + opening the menu. The ring matches the page background to detach it from the icon. */} + + {current.code.toUpperCase()} + {open && createPortal(