feat(NetworkConfigManager, FilterManager): replace select with GatewayAutocompleteInput for parent gateway selection; update display to include comments in gateway details
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m43s

This commit is contained in:
2026-01-22 12:29:29 +07:00
parent 64f4b76d3f
commit ea6220d955
3 changed files with 258 additions and 33 deletions
+9 -32
View File
@@ -5,6 +5,7 @@ import FormModal from './components/FormModal.jsx';
import FormField from './components/FormField.jsx';
import ConfirmModal from './components/ConfirmModal.jsx';
import ServerAutocompleteInput from './components/ServerAutocompleteInput.jsx';
import GatewayAutocompleteInput from './components/GatewayAutocompleteInput.jsx';
import PreviewConfigModal from './components/filter/PreviewConfigModal.jsx';
import { countryToFlag } from './utils/serverUtils.js';
import {
@@ -1506,38 +1507,14 @@ function NetworkConfigManager() {
{editingGateway.type === 'recursive' && (
<div className="col-12">
<label className="form-label">Родительский gateway или интерфейс</label>
<select
className="form-select"
value={editingGateway.parentGatewayId || ''}
onChange={(e) => setEditingGateway({ ...editingGateway, parentGatewayId: e.target.value })}
>
<option value="">Выберите родительский gateway или интерфейс</option>
{/* Прямые gateway */}
<optgroup label="Прямые gateway">
{config.gateways
.filter(g => g.id !== editingGateway.id && g.type === 'direct' && g.ip)
.map(g => (
<option key={g.id} value={g.id}>
Gateway: {g.ip} {g.description ? `- ${g.description}` : ''}
</option>
))}
</optgroup>
{/* Интерфейсы */}
<optgroup label="Интерфейсы (по remote IP)">
{config.tunnelInterfaces
.filter(i => i.remoteIp)
.map(i => {
const server = getServerInfo(i.serverId);
return (
<option key={i.id} value={i.id}>
Интерфейс: {i.remoteIp} ({i.name || i.type}) {server ? `- ${server.dns || server.ip}` : ''}
</option>
);
})}
</optgroup>
</select>
<GatewayAutocompleteInput
value={editingGateway.parentGatewayId}
onChange={(val) => setEditingGateway({ ...editingGateway, parentGatewayId: val })}
gateways={config.gateways}
interfaces={config.tunnelInterfaces}
excludeGatewayId={editingGateway.id}
placeholder="Выберите родительский gateway или интерфейс..."
/>
<div className="form-text">
Рекурсивный gateway может ссылаться на прямой gateway или на интерфейс (по его remote IP)
</div>