From 5afc233a4b2076c7934fe41c763c8d80553d61ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=97=D0=B8=D0=BC=D0=B8=D0=BD?= Date: Sun, 10 May 2026 18:30:49 +0000 Subject: [PATCH] fix(admin-ui): compact catalog toolbar (single row) --- ordinis-admin-ui/src/i18n.ts | 8 ++ .../src/routes/dictionaries.index.tsx | 115 ++++++++++-------- 2 files changed, 72 insertions(+), 51 deletions(-) diff --git a/ordinis-admin-ui/src/i18n.ts b/ordinis-admin-ui/src/i18n.ts index 3727ee2..324e6d5 100644 --- a/ordinis-admin-ui/src/i18n.ts +++ b/ordinis-admin-ui/src/i18n.ts @@ -225,6 +225,10 @@ i18n 'dict.list.section.PUBLIC': 'Публичные', 'dict.list.section.INTERNAL': 'Внутренние', 'dict.list.section.RESTRICTED': 'Ограниченные', + 'dict.list.section.PUBLIC.short': 'PUB', + 'dict.list.section.INTERNAL.short': 'INT', + 'dict.list.section.RESTRICTED.short': 'RES', + 'dict.list.deps.short': 'СО СВЯЗЯМИ', // Catalog v2 (URL-driven filters + sort + density) 'dict.list.heading': 'Каталог справочников', 'dict.list.filter.scope': 'Фильтр по области', @@ -695,6 +699,10 @@ i18n 'dict.list.section.PUBLIC': 'Public', 'dict.list.section.INTERNAL': 'Internal', 'dict.list.section.RESTRICTED': 'Restricted', + 'dict.list.section.PUBLIC.short': 'PUB', + 'dict.list.section.INTERNAL.short': 'INT', + 'dict.list.section.RESTRICTED.short': 'RES', + 'dict.list.deps.short': 'WITH LINKS', // Catalog v2 'dict.list.heading': 'Dictionary catalog', 'dict.list.filter.scope': 'Scope filter', diff --git a/ordinis-admin-ui/src/routes/dictionaries.index.tsx b/ordinis-admin-ui/src/routes/dictionaries.index.tsx index 660e79e..7e4de2a 100644 --- a/ordinis-admin-ui/src/routes/dictionaries.index.tsx +++ b/ordinis-admin-ui/src/routes/dictionaries.index.tsx @@ -213,9 +213,11 @@ function DictionariesPage() { actions={createButton} /> - {/* Toolbar: search + count + scope chips + "deps only" */} -
-
+ {/* Compact toolbar: всё в одной строке (wraps на narrow viewport). + Tradeoff: scope/bundle chips меньше padding'а + краткие labels. + UPPERCASE labels оставлены для consistency с brand voice (Tektur-like). */} +
+
setSearch({ q: e.target.value })} @@ -224,14 +226,15 @@ function DictionariesPage() { />
- - {t('dict.list.found', { shown: filtered.length, total: data.length })} + + {filtered.length}/{data.length} + {/* Scope chips: компактные, dot + count, full label по hover'у через title */}
{SCOPE_ORDER.map((scope) => { const selected = scopeFilter.has(scope) @@ -242,76 +245,86 @@ function DictionariesPage() { type="button" onClick={() => toggleScope(scope)} aria-pressed={selected} - className={`px-3 py-1.5 rounded-full text-2xs uppercase tracking-label flex items-center gap-1.5 border transition focus:outline-none focus:ring-2 focus:ring-ultramarain/40 ${ + title={t(`dict.list.section.${scope}`)} + className={`px-2 py-1 rounded-full text-2xs uppercase tracking-label flex items-center gap-1 border transition focus:outline-none focus:ring-2 focus:ring-ultramarain/40 font-mono ${ selected ? 'border-ultramarain bg-orbit/40 text-ultramarain' : 'border-regolith hover:border-ultramarain/60 text-carbon' }`} >
+ {/* Vertical divider */} +
- {/* Bundle filter row */} -
- - BUNDLE - - - {Array.from(bundleCounts.entries()) - .sort(([a], [b]) => a.localeCompare(b)) - .map(([bundle, count]) => { - const selected = bundleFilter === bundle - return ( - - ) - })} -
- {/* Empty state */} {filtered.length === 0 ? (