From 9b9dcc3b1230d1fba47b215d58b7644a46c89188 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Wed, 19 Aug 2026 20:04:09 +0700 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=D0=B2=D1=8B=D1=80=D0=BE=D0=B2=D0=BD?= =?UTF-8?q?=D1=8F=D1=82=D1=8C=20health-check=20=D0=BF=D0=BB=D0=B8=D1=82?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B8=20=D1=82=D0=B8=D0=BF=20TCP/HTTP=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B4=20ReUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .../components/health-check-config-fields.tsx | 46 +++++----- .../reui-kit/health-source-tiles.tsx | 83 +++++++++++-------- 2 files changed, 72 insertions(+), 57 deletions(-) diff --git a/apps/web/src/components/health-check-config-fields.tsx b/apps/web/src/components/health-check-config-fields.tsx index cbe63aa..806d473 100644 --- a/apps/web/src/components/health-check-config-fields.tsx +++ b/apps/web/src/components/health-check-config-fields.tsx @@ -18,7 +18,9 @@ import { } from '@cfdm/ui/components/select' import { Switch } from '@cfdm/ui/components/switch' import { FieldGroup } from '@cfdm/ui/components/field' -import { ToggleGroup, ToggleGroupItem } from '@cfdm/ui/components/toggle-group' +import { Button } from '@cfdm/ui/components/button' +import { ButtonGroup } from '@cfdm/ui/components/button-group' +import { CableIcon, GlobeIcon } from 'lucide-react' import { cn } from '@cfdm/ui/lib/utils' import { HealthAggregateTiles, @@ -215,28 +217,30 @@ export function HealthCheckConfigFields({
- { - const picked = next[0] - if (picked === 'tcp' || picked === 'http') { - patch({ type: picked }) - } - }} - > - + + + + diff --git a/apps/web/src/components/reui-kit/health-source-tiles.tsx b/apps/web/src/components/reui-kit/health-source-tiles.tsx index 47e22d1..90a3e1a 100644 --- a/apps/web/src/components/reui-kit/health-source-tiles.tsx +++ b/apps/web/src/components/reui-kit/health-source-tiles.tsx @@ -1,11 +1,19 @@ import type { KeyboardEvent, ReactNode } from 'react' -import { CheckIcon, ServerIcon, LayersIcon, ShieldAlertIcon, ScaleIcon } from 'lucide-react' +import { ServerIcon, LayersIcon, ShieldAlertIcon, ScaleIcon } from 'lucide-react' import { Frame, FramePanel } from '@/components/reui/frame' import { IconTile } from '@/components/reui/icon-tile' +import { Badge } from '@/components/reui/badge' +import { + Item, + ItemActions, + ItemContent, + ItemDescription, + ItemMedia, + ItemTitle, +} from '@cfdm/ui/components/item' import { cn } from '@cfdm/ui/lib/utils' import type { HealthCheckAggregate, HealthCheckProvider } from '@cfdm/shared' -import { kpiCols } from './kpi-cols' export type HealthProvider = HealthCheckProvider export type HealthAggregate = HealthCheckAggregate @@ -103,7 +111,7 @@ function handleTileKeyDown(onActivate: () => void, event: KeyboardEvent handleTileKeyDown(onActivate, event)} > -
- -
-
- {title} - {selected ? ( - - ) : null} -
-

- {description} -

-
-
+ + + + + + {title} + {description} + + {selected ? ( + + + Выбрано + + + ) : null} + ) } -function TileGrid({ children, count }: { children: ReactNode; count: number }) { +function ChoiceFrame({ children }: { children: ReactNode }) { return ( - -
{children}
+ + {children} ) } /** * Мультивыбор источников проб (Local / Cloudflare / Globalping). - * Preview: https://reui.io/preview/base/card-12 · https://reui.io/preview/base/stats-12 + * Preview: https://reui.io/preview/base/list-9 · https://reui.io/preview/base/stats-12 * Docs: https://reui.io/docs/components/base/frame · https://reui.io/docs/components/base/icon-tile */ export function HealthSourceTiles({ @@ -190,9 +201,9 @@ export function HealthSourceTiles({ } return ( - + {PROVIDER_ITEMS.map((item) => ( - toggle(item.id)} /> ))} - + ) } /** * Правило агрегации (ровно одно): any / all / majority. - * Preview: https://reui.io/preview/base/card-12 · https://reui.io/preview/base/settings-5 + * Preview: https://reui.io/preview/base/list-9 · https://reui.io/preview/base/settings-5 */ export function HealthAggregateTiles({ value, @@ -220,9 +231,9 @@ export function HealthAggregateTiles({ }) { const selected = value || 'majority' return ( - + {AGGREGATE_ITEMS.map((item) => ( - onChange(item.id)} /> ))} - + ) }