fix(admin-ui): translate field labels + responsive header + modal max-h

Issues:
- Field labels (ORBIT/STATUS/COUNTRY/MASS_KG/...) показывались raw'ом потому
  что backend schema не присылает title. Добавил humanize() (snake_case → 'Snake Case')
  + i18n fallback t('field.$key') для известных полей spacecraft/satellite_type/
  ground_station: name, designator, norad_id, status, country, operator, mass_kg,
  mission, orbit, launch_date, decay_date, spectrum_bands, satellite_type_code, etc.
- Modal panel рос в высоту бесконечно (nstart-ui Modal не клампит max-h),
  на iPad портрете форма уходила за viewport. panelClassName=max-h-[calc(100vh-2rem)]
  flex flex-col + bodyClassName=overflow-y-auto flex-1.
- Header в __root: padding/gap responsive (px-4 sm:px-6, py-3 sm:py-4, gap-3 sm:gap-6),
  flex-wrap чтобы LanguageSwitch на узких экранах переносился под навигацию.
- Main container: px-4 sm:px-6 + py-4 sm:py-8.
This commit is contained in:
Zimin A.N.
2026-05-04 02:47:06 +03:00
parent 7aed67fce5
commit 43a06d1a7b
4 changed files with 50 additions and 5 deletions
+3 -3
View File
@@ -17,8 +17,8 @@ function RootLayout() {
return (
<div className="min-h-full flex flex-col bg-white">
<header className="border-b border-regolith bg-white">
<div className="max-w-6xl mx-auto px-6 py-4 flex items-center gap-6">
<Link to="/" className="font-primary text-lg text-ultramarain">
<div className="max-w-6xl mx-auto px-4 sm:px-6 py-3 sm:py-4 flex items-center flex-wrap gap-3 sm:gap-6">
<Link to="/" className="font-primary text-base sm:text-lg text-ultramarain">
{t('app.title')}
</Link>
<nav className="flex gap-4 text-sm">
@@ -39,7 +39,7 @@ function RootLayout() {
</div>
</div>
</header>
<main className="flex-1 max-w-6xl mx-auto w-full px-6 py-8">
<main className="flex-1 max-w-6xl mx-auto w-full px-4 sm:px-6 py-4 sm:py-8">
<Outlet />
</main>
</div>
@@ -185,6 +185,8 @@ function DictionaryDetail() {
: ''
}
maxWidth="max-w-4xl"
panelClassName="max-h-[calc(100vh-2rem)] my-4 flex flex-col"
bodyClassName="overflow-y-auto flex-1"
>
{detailQuery.data && (edit.kind === 'create' || edit.kind === 'edit') && (
<SchemaDrivenForm