From e580a04007e2a0658b3cfcedc73f240bd81978ac Mon Sep 17 00:00:00 2001 From: "Zimin A.N." Date: Mon, 11 May 2026 19:46:33 +0300 Subject: [PATCH] feat(editor): scope-colored InfoPanel badge + Time-travel label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per redesign (4) prototype. - InfoPanel scope badge: было `` (generic light bg). Стало scope-color filled chip: PUBLIC→accent-bg, INTERNAL→warn-bg, RESTRICTED→pink-bg. Matches table SCOPE col + filter pills. - i18n: timeTravel.button RU "Просмотр на дату" → "Time-travel…"; EN "View as of date" → "Time-travel…". User confirmed: "Time-travel label оставь" — единый label везде, без локализации (бренд-слово как редизайн). --- .../src/components/editor/EditorInfoPanel.tsx | 19 ++++++++++++++++--- ordinis-admin-ui/src/i18n.ts | 4 ++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ordinis-admin-ui/src/components/editor/EditorInfoPanel.tsx b/ordinis-admin-ui/src/components/editor/EditorInfoPanel.tsx index 6d4588a..0f780a4 100644 --- a/ordinis-admin-ui/src/components/editor/EditorInfoPanel.tsx +++ b/ordinis-admin-ui/src/components/editor/EditorInfoPanel.tsx @@ -2,11 +2,17 @@ import { useMemo } from 'react' import { Link } from '@tanstack/react-router' import { useTranslation } from 'react-i18next' import { ClockCounterClockwiseIcon, MapTrifoldIcon, DownloadSimpleIcon, ArrowRightIcon } from '@phosphor-icons/react' -import { Badge } from '@/ui' import { useDictionaryDependents } from '@/api/queries' -import type { DictionaryDetail, OnCloseAction, SchemaDependent } from '@/api/client' +import type { DataScope, DictionaryDetail, OnCloseAction, SchemaDependent } from '@/api/client' import { cn } from '@/lib/utils' +/** Scope badge — solid scope-color bg per redesign prototype. */ +const SCOPE_BADGE_CLASS: Record = { + PUBLIC: 'bg-accent-bg text-accent', + INTERNAL: 'bg-warn-bg text-warn', + RESTRICTED: 'bg-pink-bg text-pink', +} + /** * EditorInfoPanel — left rail с dict metadata per handoff prototype Screen 2. * @@ -47,7 +53,14 @@ export function EditorInfoPanel({ detail, recordCount, actions }: EditorInfoPane return (