From 79ffff194f3897a999403a868505db91cf2c51b8 Mon Sep 17 00:00:00 2001 From: Dmitriy Petrov Date: Tue, 11 Aug 2026 08:50:44 +0300 Subject: [PATCH] Update VPN client and gateway behavior --- src/shared/versions.ts | 4 +- .../features/connection/ConnectionPanel.tsx | 23 ++- src/web/features/devices/DevicesFeature.tsx | 18 +-- src/web/features/devices/DevicesPanel.tsx | 33 ++-- .../ConnectivityDiagnosticsPanel.tsx | 41 +++-- .../diagnostics/DiagnosticsFeature.tsx | 18 +-- .../instructions/InstructionsFeature.tsx | 92 +++++------ src/web/features/routing/RoutingFeature.tsx | 60 ++++---- .../subscription/SubscriptionFeature.tsx | 85 +++++------ src/web/styles/base.css | 33 ++-- src/web/styles/features/connection.css | 46 +++--- src/web/styles/features/devices.css | 138 +++++++++++------ src/web/styles/features/diagnostics.css | 66 ++++---- src/web/styles/features/instructions.css | 27 ++-- src/web/styles/features/routing.css | 66 ++++---- src/web/styles/features/servers.css | 80 ++++++---- src/web/styles/features/subscription.css | 71 +++++---- src/web/styles/layout.css | 64 ++++---- src/web/styles/primitives.css | 144 +++++++++--------- src/web/styles/themes.css | 26 ++-- src/web/styles/tokens.css | 72 +++++++++ src/web/ui/CopyButton.tsx | 34 +++++ src/web/ui/Drawer.tsx | 58 +++++++ src/web/ui/RailAction.tsx | 39 +++++ src/web/ui/Tooltip.tsx | 10 ++ test/web/connection-panel-contract.test.js | 2 +- test/web/device-inventory-contract.test.js | 14 +- .../web/instructions-feature-contract.test.js | 2 +- test/web/prometheus-instructions.test.js | 2 +- test/web/responsive-layout-contract.test.js | 16 +- test/web/rule-editor-contract.test.js | 15 +- test/web/server-picker.test.js | 2 +- test/web/style-boundaries.test.js | 135 +++++++++++++--- test/web/style-source.js | 50 +++--- test/web/ui-foundations-contract.test.js | 40 +++++ 35 files changed, 1036 insertions(+), 590 deletions(-) create mode 100644 src/web/ui/CopyButton.tsx create mode 100644 src/web/ui/Drawer.tsx create mode 100644 src/web/ui/RailAction.tsx create mode 100644 src/web/ui/Tooltip.tsx create mode 100644 test/web/ui-foundations-contract.test.js diff --git a/src/shared/versions.ts b/src/shared/versions.ts index 1a5627f..c805c1e 100644 --- a/src/shared/versions.ts +++ b/src/shared/versions.ts @@ -1,6 +1,6 @@ export const HARBOR_VERSIONS = Object.freeze({ - macClient: '0.23.7', - gatewayClient: '0.24.7', + macClient: '0.23.8', + gatewayClient: '0.24.8', gatewayBackend: '0.24.0', }); diff --git a/src/web/features/connection/ConnectionPanel.tsx b/src/web/features/connection/ConnectionPanel.tsx index cdb7209..640db76 100644 --- a/src/web/features/connection/ConnectionPanel.tsx +++ b/src/web/features/connection/ConnectionPanel.tsx @@ -1,5 +1,7 @@ import { useState, type ReactNode } from 'react'; import { ConfirmationDialog } from '../../ui/ConfirmationDialog.js'; +import { CopyButton } from '../../ui/CopyButton.js'; +import { Tooltip } from '../../ui/Tooltip.js'; import { connectionAction, connectionDurationParts, @@ -170,9 +172,9 @@ export function ConnectionPanel({ > {brandSlot} {powerButton} - {powerUnavailable && + {powerUnavailable && {remoteOwned ? 'Подключением управляет Harbor Gateway' : 'Сначала добавьте подписку и выберите сервер'} - } + }
{connected && !remoteOwned ? ( @@ -216,9 +218,9 @@ export function ConnectionPanel({ - + {durationMode === 'digital' ? 'Показать время словами' : 'Показать цифровой таймер'} - + ) : (

@@ -254,16 +256,13 @@ export function ConnectionPanel({

{proxyKinds.map(([kind, label]) => { const feedback = copyFeedback?.[kind]; - return ; + />; })}
diff --git a/src/web/features/devices/DevicesFeature.tsx b/src/web/features/devices/DevicesFeature.tsx index d9f930f..a0f6f20 100644 --- a/src/web/features/devices/DevicesFeature.tsx +++ b/src/web/features/devices/DevicesFeature.tsx @@ -1,4 +1,5 @@ import { useEffect, useRef, useState } from 'react'; +import { RailAction } from '../../ui/RailAction.js'; import { formatByteString, formatLastSeen, @@ -191,13 +192,13 @@ export function useDevicesFeature({ export type DevicesFeature = ReturnType; export function DevicesToggle({ feature, onToggle }: { feature: DevicesFeature; onToggle: () => void }) { - return ; + ; } export function GatewayTrafficSummary({ feature, now }: { feature: DevicesFeature; now: number }) { diff --git a/src/web/features/devices/DevicesPanel.tsx b/src/web/features/devices/DevicesPanel.tsx index b3911b2..ae4e3c0 100644 --- a/src/web/features/devices/DevicesPanel.tsx +++ b/src/web/features/devices/DevicesPanel.tsx @@ -5,8 +5,9 @@ import { useRef, useState, type CSSProperties, - type ReactNode, } from 'react'; +import { Drawer } from '../../ui/Drawer.js'; +import { Tooltip } from '../../ui/Tooltip.js'; import { copyText } from '../../utils/clientControls.js'; import { byteString, @@ -40,10 +41,6 @@ function requestMessage(value: unknown) { return typeof message === 'string' ? message : undefined; } -function Tooltip({ children }: { children: ReactNode }) { - return {children}; -} - function TextMorph({ from, to }: { from: string; to: string }) { const anchor = from.length >= to.length ? from : to; return