From f486b72884c6264eec537e20fd31e1b064ba5535 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Sun, 18 Oct 2026 01:08:42 +0700 Subject: [PATCH] =?UTF-8?q?feat(design-preview):=20=D1=88=D0=B0=D0=BF?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BA=D0=B0=D0=BA=20=D0=B2=20=D0=BA=D0=B0=D0=BD?= =?UTF-8?q?=D0=B2=D0=B0=D1=81=D0=B5=20=E2=80=94=20=D0=B7=D0=B0=D0=B3=D0=BE?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2=D0=BE=D0=BA,=20=D0=B8=D0=BD=D1=84=D0=BE-?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20=D0=B8=20=D0=BC=D0=BE?= =?UTF-8?q?=D0=BD=D0=B8=D1=82=D0=BE=D1=80=20=C2=AB=D0=92=D0=BD=D0=B8=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- apps/web/src/design-preview/mock.ts | 8 +++ .../web/src/design-preview/preview-chrome.tsx | 66 +++++++++++++------ 2 files changed, 54 insertions(+), 20 deletions(-) diff --git a/apps/web/src/design-preview/mock.ts b/apps/web/src/design-preview/mock.ts index ca21d51..b510442 100644 --- a/apps/web/src/design-preview/mock.ts +++ b/apps/web/src/design-preview/mock.ts @@ -99,6 +99,14 @@ export const MONITOR_ITEMS: Array<{ age: '3 дн', to: '/design-preview/oidc', }, + { + id: 'nopasskey', + tone: 'wn', + title: '3 пользователя без passkey', + text: 'ops, pavel, dns-bot · вход только по паролю', + age: '1 дн', + to: '/design-preview/users', + }, { id: 'api', tone: 'ok', title: 'API портала', text: '/ready · ответ 18 мс', age: 'сейчас', to: '/design-preview/apps' }, { id: 'jwks', tone: 'ok', title: 'JWKS и discovery', text: 'Подпись RS256 · ключ активен', age: 'сейчас', to: '/design-preview/oidc' }, ] diff --git a/apps/web/src/design-preview/preview-chrome.tsx b/apps/web/src/design-preview/preview-chrome.tsx index 32e9140..50c365f 100644 --- a/apps/web/src/design-preview/preview-chrome.tsx +++ b/apps/web/src/design-preview/preview-chrome.tsx @@ -8,6 +8,7 @@ import { ContrastIcon, FingerprintIcon, GlobeIcon, + InfoIcon, KeyRoundIcon, LayoutDashboardIcon, LogOutIcon, @@ -32,7 +33,6 @@ import { BreadcrumbItem, BreadcrumbList, BreadcrumbPage, - BreadcrumbSeparator, } from '@authportal/ui/components/breadcrumb' import { Button } from '@authportal/ui/components/button' import { @@ -387,27 +387,37 @@ export function PreviewSidebar() { function MonitorPopover() { const bad = MONITOR_ITEMS.filter((m) => m.tone !== 'ok') + const errors = bad.filter((m) => m.tone === 'er').length + const warnings = bad.length - errors return ( } > - - Система - + + Внимание + {bad.length} - +
- Монитор Auth Portal - Внимание +
+ Монитор Auth Portal + обновлено 14:02 +
+ Внимание +
+
+ {errors} ошибка + {warnings} предупреждения + {MONITOR_ITEMS.length - bad.length} в норме
    {MONITOR_ITEMS.map((m) => ( @@ -434,10 +444,35 @@ function MonitorPopover() { ) } +function FreshnessPopover() { + const [auto, setAuto] = useState(true) + return ( + + + } + > + + + +
    + + Обновлено 14:02:11 · Live +
    +

    Данные портала: GET /api/v1/admin/* · сессия и права из базы портала. В макете запросы не отправляются.

    + +
    +
    + ) +} + export function PreviewHeader() { const pathname = useRouterState({ select: (s) => s.location.pathname }) const { setPaletteOpen } = usePreviewStore() - const [auto, setAuto] = useState(true) const current = NAV_ITEMS.find((i) => pathname === i.to || pathname.startsWith(`${i.to}/`)) return ( @@ -446,22 +481,13 @@ export function PreviewHeader() { - Auth Portal - - {current?.group ?? 'Портал'} - {current?.label ?? 'Макет'}
    - - - Обновлено 14:02:11 · Live - - авто - +