feat(layout): catalog relative time + chevron + flat sidebar per redesign (4)

Per /Users/zimin/Downloads/Ordinis (4)/redesign/compact.html (бэкграунд
прототипа уже #faf9f5 — match'ит наш neutral default).

Catalog table:
- ИЗМЕНЁН column показывает relative time: Xс / Xмин / Xч / Xд / Xмес / Xг.
  Прошлая абсолютная дата (05/06/2026) затирала scale ("5 минут vs 3 месяца —
  визуально одинаково далеко"). Прототип использует 2ч, 3д, 1мес.
- Chevron `›` column добавлен в конец каждой строки — affordance что row
  кликабелен (открывает editor).

Sidebar:
- Flatten: убраны section labels (workflow / admin). Все nav items в одном
  списке per redesign: Главная → Справочники → Мои черновики → На ревью →
  Outbox → Webhooks → Аудит → Поиск.
- /graph удалён из sidebar — теперь reachable только через catalog toolbar
  "Граф ⇄" button (single entry point, no duplication).
- Применено в обоих Sidebar (desktop) и MobileSidebar (drawer).

Cleanup: убран unused GitBranch icon import.
This commit is contained in:
Zimin A.N.
2026-05-11 19:26:56 +03:00
parent cbe21dbc52
commit 7e33456d70
2 changed files with 31 additions and 36 deletions
@@ -10,7 +10,6 @@ import {
Webhook,
ScrollText,
Search,
GitBranch,
type LucideIcon,
} from 'lucide-react'
import { useAuth } from 'react-oidc-context'
@@ -63,6 +62,9 @@ export function Sidebar() {
// sidebar'а — overkill. Skip badge.
const reviewsCount = 0
// Flat list per redesign/compact.html — no section labels, /graph removed
// (now reachable via catalog toolbar "Граф ⇄" button). Order: Главная →
// Справочники → Мои черновики → На ревью → Outbox → Webhooks → Аудит → Поиск.
const sections: NavSection[] = [
{
items: [
@@ -73,14 +75,6 @@ export function Sidebar() {
icon: Database,
badge: dictsCount > 0 ? dictsCount : undefined,
},
{ to: '/search', label: t('nav.search'), icon: Search },
// Graph view — Stage 3.3 placeholder. Когда d3-force готов.
{ to: '/graph', label: t('nav.graph'), icon: GitBranch },
],
},
{
label: t('nav.section.workflow'),
items: [
{
to: '/my-drafts',
label: t('nav.myDrafts'),
@@ -95,14 +89,10 @@ export function Sidebar() {
badge: reviewsCount > 0 ? reviewsCount : undefined,
authRequired: true,
},
],
},
{
label: t('nav.section.admin'),
items: [
{ to: '/audit', label: t('nav.audit'), icon: ScrollText, authRequired: true },
{ to: '/outbox', label: t('nav.outbox'), icon: Inbox, authRequired: true },
{ to: '/webhooks', label: t('nav.webhooks'), icon: Webhook, authRequired: true },
{ to: '/audit', label: t('nav.audit'), icon: ScrollText, authRequired: true },
{ to: '/search', label: t('nav.search'), icon: Search },
],
},
]
@@ -309,6 +299,7 @@ export function MobileSidebar({ open, onClose }: { open: boolean; onClose: () =>
const myDraftsCount = myDrafts.data?.totalElements ?? 0
const reviewsCount = 0
// Flat list per redesign — same as desktop Sidebar above.
const sections: NavSection[] = [
{
items: [
@@ -319,13 +310,6 @@ export function MobileSidebar({ open, onClose }: { open: boolean; onClose: () =>
icon: Database,
badge: dictsCount > 0 ? dictsCount : undefined,
},
{ to: '/search', label: t('nav.search'), icon: Search },
{ to: '/graph', label: t('nav.graph'), icon: GitBranch },
],
},
{
label: t('nav.section.workflow'),
items: [
{
to: '/my-drafts',
label: t('nav.myDrafts'),
@@ -340,14 +324,10 @@ export function MobileSidebar({ open, onClose }: { open: boolean; onClose: () =>
badge: reviewsCount > 0 ? reviewsCount : undefined,
authRequired: true,
},
],
},
{
label: t('nav.section.admin'),
items: [
{ to: '/audit', label: t('nav.audit'), icon: ScrollText, authRequired: true },
{ to: '/outbox', label: t('nav.outbox'), icon: Inbox, authRequired: true },
{ to: '/webhooks', label: t('nav.webhooks'), icon: Webhook, authRequired: true },
{ to: '/audit', label: t('nav.audit'), icon: ScrollText, authRequired: true },
{ to: '/search', label: t('nav.search'), icon: Search },
],
},
]