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} /> - -