Simplify rail motion and add routing help toggle
Build and Deploy Gateway / build-and-push (push) Successful in 35s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-08-17 17:26:57 +03:00
parent 0a0a932057
commit dc1fd76c44
11 changed files with 91 additions and 221 deletions
@@ -249,8 +249,6 @@ export function DevicesToggle({
</g>
<rect className="client-rail-device-phone" x="16.5" y="7" width="5" height="9" rx="1.3" />
<path className="client-rail-device-link" d="M19 16v3h-5.5" />
<path className="client-rail-device-bridge" d="M10.5 19h3" />
<path className="client-rail-device-packet" pathLength="1" d="M7 19h12" />
</svg>
</RailAction>;
}
@@ -61,7 +61,6 @@ export function DiagnosticsToggle({
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path className="client-rail-diagnostics-trace" d="M4.5 10h2l1.2-2.4 2.2 4.8 1.2-2.4h3.4" />
<path className="client-rail-diagnostics-scan" pathLength="1" d="M4.5 10h2l1.2-2.4 2.2 4.8 1.2-2.4h3.4" />
<g className="client-rail-diagnostics-position">
<g className="client-rail-diagnostics-glass">
<circle cx="9.5" cy="9.5" r="6.5" />
+19 -8
View File
@@ -863,6 +863,7 @@ export function RoutingPendingStatus({
}
export function RoutingPanel({ feature, statusSlot }: { feature: RoutingFeature; statusSlot?: ReactNode }) {
const [helpOpen, setHelpOpen] = useState(false);
const draftRules = feature.rules.filter((rule) => !rule.removing);
const editorDisabled = feature.blocked || !feature.editable;
const canAdd = canAppendRouteRule(draftRules) && !editorDisabled;
@@ -891,7 +892,6 @@ export function RoutingPanel({ feature, statusSlot }: { feature: RoutingFeature;
Сохранить
</button>
<h2 id="local-rules-title">Правила маршрутизации</h2>
<p>Проверяются сверху вниз. Первое совпадение выбирает маршрут.</p>
{!feature.editable && (
<p className="client-local-rules-runtime" role="status">
Обновите Harbor, чтобы редактировать правила.
@@ -912,14 +912,25 @@ export function RoutingPanel({ feature, statusSlot }: { feature: RoutingFeature;
Правила сохранены и начнут работать после запуска Harbor.
</p>
)}
<details className="client-local-rules-help">
<summary>Как работают правила</summary>
<div>
<p>Правила проверяются сверху вниз. Первое совпадение выбирает маршрут: щит означает VPN, стрелка прямое подключение.</p>
<p>Правила применяются только к трафику внутри маршрутизации Harbor. Gateway в режиме «Напрямую» и Connect при активном Harbor Gateway обходят локальный список.</p>
<p>Можно вставить полный URL: Harbor сразу оставит только домен. Путь и параметры HTTPS для маршрутизации недоступны.</p>
<div className={`client-local-rules-help${helpOpen ? ' is-open' : ''}`}>
<button
type="button"
aria-expanded={helpOpen}
aria-controls="client-local-rules-help-content"
onClick={() => setHelpOpen((current) => !current)}
>
Как работают правила
</button>
<div className="client-local-rules-help-reveal" aria-hidden={!helpOpen}>
<div id="client-local-rules-help-content" className="client-local-rules-help-content">
<div className="client-local-rules-help-copy">
<p>Правила проверяются сверху вниз. Первое совпадение выбирает маршрут: щит означает VPN, стрелка прямое подключение.</p>
<p>Правила применяются только к трафику внутри маршрутизации Harbor. Gateway в режиме «Напрямую» и Connect при активном Harbor Gateway обходят локальный список.</p>
<p>Можно вставить полный URL: Harbor сразу оставит только домен. Путь и параметры HTTPS для маршрутизации недоступны.</p>
</div>
</div>
</div>
</details>
</div>
</header>
<form id="client-local-rules-form" className="client-local-rules-form" onSubmit={feature.save}>
@@ -322,7 +322,6 @@ export function SubscriptionToggle({
<g className="client-rail-subscription-front">
<rect className="client-rail-subscription-card" x="4" y="6" width="14" height="14" rx="2" />
<path className="client-rail-subscription-lines" d="M7.5 10.5h6.5M7.5 14.5H12" />
<path className="client-rail-subscription-scan" pathLength="1" d="M7.5 10.5H14" />
</g>
</svg>
</RailAction>;