Simplify subscription profile management UI
Build and Deploy Gateway / build-and-push (push) Successful in 19s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-08-11 07:36:44 +03:00
parent af1c45e424
commit 5cad3e9061
12 changed files with 148 additions and 251 deletions
+4 -6
View File
@@ -8,6 +8,7 @@ import React, {
import {
copyText,
localProxyUrls,
subscriptionDomain,
} from '../utils/clientControls.js';
import {
operationBlocked,
@@ -103,7 +104,6 @@ interface ClientOverviewPageProps {
operations?: OperationRegistrySnapshot;
error: UiError | null;
onAddProfile: (label: string, url: string) => Promise<unknown>;
onRenameProfile: (profileId: string, label: string) => Promise<unknown>;
onSelectProfileServer: (profileId: string, serverId: string) => Promise<unknown>;
onActivateProfile: (profileId: string) => Promise<unknown>;
onRefreshProfile: (profileId: string) => Promise<unknown>;
@@ -410,7 +410,6 @@ export function ClientOverviewPage({
operations = {},
error,
onAddProfile,
onRenameProfile,
onSelectProfileServer,
onActivateProfile,
onRefreshProfile,
@@ -493,7 +492,6 @@ export function ClientOverviewPage({
isGateway,
gatewayDirect,
onAdd: onAddProfile,
onRename: onRenameProfile,
onRefresh: onRefreshProfile,
onForget: onForgetProfile,
onActivate: onActivateProfile,
@@ -608,15 +606,15 @@ export function ClientOverviewPage({
? 'Gateway · сервер не определён'
: connected
? appliedProfile && appliedServer
? `${appliedProfile.label} · ${appliedServer.label}`
? `${subscriptionDomain(appliedProfile.subscription.host)} · ${appliedServer.label}`
: 'VPN · сервер не определён'
: desiredProfile && desiredServer
? `Выбран: ${desiredProfile.label} · ${desiredServer.label}`
? `Выбран: ${subscriptionDomain(desiredProfile.subscription.host)} · ${desiredServer.label}`
: 'Сервер не выбран';
const switchIdentity = gatewayDirect
? 'Данные применённого сервера Gateway недоступны'
: switchingServer && operationProfile && operationServer
? `Переключаем на ${operationProfile.label} · ${operationServer.label}`
? `Переключаем на ${subscriptionDomain(operationProfile.subscription.host)} · ${operationServer.label}`
: '';
return (