From 92ba474ca92121ab90a8195dd38439a011e082d0 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Wed, 30 Sep 2026 10:24:35 +0700 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=D0=B8=D1=81=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D0=BA=D0=BE=D0=BD=D1=84=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D1=82=D1=8B=20=D0=B2=D0=BE=D1=81=D1=81=D1=82=D0=B0=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20Firewall?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(main)/firewall/page.tsx | 12 ++-- docs/ux-ui-plan.md | 4 +- docs/ux-ui-progress.md | 10 +++- docs/ux-ui-stage-9.md | 4 ++ tests/e2e/firewall-history-lock.spec.ts | 75 +++++++++++++++++++++++++ tests/e2e/firewall-move.spec.ts | 2 + 6 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 tests/e2e/firewall-history-lock.spec.ts diff --git a/app/(main)/firewall/page.tsx b/app/(main)/firewall/page.tsx index c93282a4..c6b0b011 100644 --- a/app/(main)/firewall/page.tsx +++ b/app/(main)/firewall/page.tsx @@ -2025,7 +2025,9 @@ function FirewallPageInner() { }, [isLive, historyServerId, apiFetch]) const restoreRevision = useCallback(async (id: string) => { - if (!isLive || !historyServerId) return + if (!isLive || !historyServerId) throw new Error("Выберите устройство в режиме Live") + if (mutationLock.current) throw new Error("Дождитесь завершения текущей операции Firewall") + mutationLock.current = true setHistoryRestoring(true) try { const res = await apiFetch<{ ok: boolean }>( @@ -2039,6 +2041,7 @@ function FirewallPageInner() { } catch (err) { throw err } finally { + mutationLock.current = false setHistoryRestoring(false) } }, [isLive, historyServerId, apiFetch, loadLive, loadRevisions]) @@ -2492,8 +2495,8 @@ function FirewallPageInner() {