From 20a3d00bf1f22c25f09f7c0721e877c113146186 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Fri, 22 May 2026 03:31:51 +0200 Subject: [PATCH] fix(frontend): hover cards, balancer load, routing dnd, modal a11y, outbound crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ClientsPage/SettingsPage/XrayPage: add hoverable to bottom card/tabs so hover affordance matches the top card - BalancerFormModal: lazy-init useState from props + destroyOnHidden so the form mounts with saved values instead of relying on a useEffect sync that could miss the first open - RoutingTab: rewrite pointer drag — handlers are now defined inside the pointerdown closure so addEventListener/removeEventListener match; drag state lives on a ref (from/to/moved) so onUp reads the real indices, not stale closure values. Adds setPointerCapture so Windows and touch keep delivering events when the cursor leaves the handle. - OutboundFormModal/InboundFormModal: blur the focused input before switching tabs to silence the aria-hidden-on-focused-element warning - utils.isArrEmpty: return true for undefined/null arrays — the old form treated undefined as "not empty" which crashed VLESSSettings.fromJson when json.vnext was missing --- frontend/src/pages/clients/ClientsPage.tsx | 1 + .../src/pages/inbounds/InboundFormModal.tsx | 3 + frontend/src/pages/settings/SettingsPage.tsx | 14 ++-- frontend/src/pages/xray/BalancerFormModal.tsx | 9 ++- frontend/src/pages/xray/OutboundFormModal.tsx | 3 + frontend/src/pages/xray/RoutingTab.tsx | 79 +++++++++++-------- frontend/src/pages/xray/XrayPage.tsx | 2 + frontend/src/utils/index.js | 2 +- 8 files changed, 68 insertions(+), 45 deletions(-) diff --git a/frontend/src/pages/clients/ClientsPage.tsx b/frontend/src/pages/clients/ClientsPage.tsx index 2bf1a262..c2f61a18 100644 --- a/frontend/src/pages/clients/ClientsPage.tsx +++ b/frontend/src/pages/clients/ClientsPage.tsx @@ -687,6 +687,7 @@ export default function ClientsPage() {