From 3d9a25feac97e7f9e59114e9e3fedfc07cea0b4d Mon Sep 17 00:00:00 2001 From: Alina Date: Tue, 17 Feb 2026 23:25:41 +0300 Subject: [PATCH] =?UTF-8?q?refactor:=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BB=D0=B5=D0=B3=D0=B5=D0=BD=D0=B4=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- frontend/src/App.tsx | 2 - .../src/components/Legend/LegendModal.tsx | 86 ------------------- frontend/src/components/Toolbar/Toolbar.tsx | 9 -- frontend/src/store/schemaStore.ts | 4 - 4 files changed, 101 deletions(-) delete mode 100644 frontend/src/components/Legend/LegendModal.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 3385647..cfbb0ad 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -5,7 +5,6 @@ import { Toolbar } from './components/Toolbar/Toolbar.tsx'; import { LeftPanel } from './components/SidePanel/LeftPanel.tsx'; import { RightPanel } from './components/SidePanel/RightPanel.tsx'; import { ConnectionsPanel } from './components/ConnectionsPanel/ConnectionsPanel.tsx'; -import { LegendModal } from './components/Legend/LegendModal.tsx'; import { SchemaCanvas } from './features/schema/SchemaCanvas.tsx'; import { ContextMenu } from './features/schema/context-menu/ContextMenu.tsx'; @@ -20,7 +19,6 @@ export default function App() { bottomPanel={} /> - ); } diff --git a/frontend/src/components/Legend/LegendModal.tsx b/frontend/src/components/Legend/LegendModal.tsx deleted file mode 100644 index 1d3e8ee..0000000 --- a/frontend/src/components/Legend/LegendModal.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { Modal, Space, Tag } from 'antd'; -import { useSchemaStore } from '../../store/schemaStore.ts'; -import { STATUS_COLORS, STATUS_LABELS } from '../../constants/statusColors.ts'; -import { EntityStatus, LineStyle, Medium } from '../../types/index.ts'; - -export function LegendModal() { - const visible = useSchemaStore((s) => s.legendVisible); - const setVisible = useSchemaStore((s) => s.setLegendVisible); - - return ( - setVisible(false)} - footer={null} - width={480} - > -
-

Цвета статусов

- - {Object.values(EntityStatus).map((status) => { - const colors = STATUS_COLORS[status]; - const label = STATUS_LABELS[status]; - return ( - - {label} - - ); - })} - -
- -
-

Типы линий

-
- {Object.values(LineStyle).map((style) => { - const dasharray = - style === LineStyle.Solid - ? '' - : style === LineStyle.Dashed - ? '8 4' - : '2 4'; - return ( -
- - - - {style} -
- ); - })} -
-
- -
-

Среда передачи

-
- {Object.values(Medium).map((medium) => ( -
- {medium} - {medium === Medium.Optical && ' — оптическое волокно'} - {medium === Medium.Copper && ' — медный кабель'} - {medium === Medium.Wireless && ' — беспроводная связь'} - {medium === Medium.Unknown && ' — неизвестная среда'} -
- ))} -
-
-
- ); -} diff --git a/frontend/src/components/Toolbar/Toolbar.tsx b/frontend/src/components/Toolbar/Toolbar.tsx index 0c47491..280ab14 100644 --- a/frontend/src/components/Toolbar/Toolbar.tsx +++ b/frontend/src/components/Toolbar/Toolbar.tsx @@ -11,7 +11,6 @@ import { NodeIndexOutlined, EyeOutlined, EditOutlined, - InfoCircleOutlined, } from '@ant-design/icons'; import { useSchemaStore } from '../../store/schemaStore.ts'; @@ -24,7 +23,6 @@ export function Toolbar() { const toggleMinimap = useSchemaStore((s) => s.toggleMinimap); const switchLineType = useSchemaStore((s) => s.switchLineType); const toggleLabels = useSchemaStore((s) => s.toggleLabels); - const setLegendVisible = useSchemaStore((s) => s.setLegendVisible); const zoom = graph ? Math.round(graph.zoom() * 100) : 100; @@ -93,13 +91,6 @@ export function Toolbar() { onChange={toggleLabels} /> - -