From 79ca6e2d05cfbb6846dd5b5c68268d16b92304ec Mon Sep 17 00:00:00 2001 From: shats Date: Fri, 13 Feb 2026 00:09:50 +0700 Subject: [PATCH] refactor(MikrotikTools): replace gateway input with card-based target selection for improved UI and user interaction --- frontend/src/MikrotikTools.jsx | 42 +++++++++++++++------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/frontend/src/MikrotikTools.jsx b/frontend/src/MikrotikTools.jsx index d72632a..aa2d39c 100644 --- a/frontend/src/MikrotikTools.jsx +++ b/frontend/src/MikrotikTools.jsx @@ -1,7 +1,6 @@ import { useEffect, useMemo, useState } from 'react'; import api from './lib/api.js'; import { useNotify } from './components/NotifyProvider.jsx'; -import GatewayAutocompleteInput from './components/GatewayAutocompleteInput.jsx'; import PageHeader from './components/PageHeader.jsx'; import TableSkeleton from './components/TableSkeleton.jsx'; import EmptyState from './components/EmptyState.jsx'; @@ -366,36 +365,33 @@ function MikrotikTools() { })} )} - )} - {/* Быстрые цели — чипы */} -
- Цель: + {/* Цели — карточки в стиле сервера/gateway */} +
{POPULAR_TARGETS.map(({ id: tid, name, target: tgt, Icon, color }) => { const isSelected = target === tgt; const bgClass = color === 'red' ? 'bg-red-lt' : color === 'blue' ? 'bg-blue-lt' : 'bg-orange-lt'; const textClass = color === 'red' ? 'text-red' : color === 'blue' ? 'text-blue' : 'text-orange'; return ( - +
+
setTarget(tgt)} + title={tgt} + > +
+ + + +
+
{name}
+
{tgt}
+
+
+
+
); })}