From 485fea7ef712288b24bbd573203a77c1a0c10a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=91=D0=BE=D0=B1?= =?UTF-8?q?=D1=8B=D1=80=D0=B5=D0=B2?= Date: Fri, 15 May 2026 03:11:18 +0300 Subject: [PATCH] fix(ui): hide cascade in FREE even when state fetch fails /api/protocols now returns uiHidden alongside edition; client applies both so cascade/warp stay hidden if /api/clients errors out (e.g. missing clientsTable in tunnel container). Co-authored-by: Cursor --- package.json | 2 +- public/app.js | 1 + server.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a91f98..c0d4728 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amnezia-admin", - "version": "1.2.14", + "version": "1.2.15", "private": true, "description": "amnezia_web — базовая панель AmneziaWG (FREE: просмотр и удаление клиентов; полная версия — PRO).", "license": "MIT", diff --git a/public/app.js b/public/app.js index 50524d5..9a92701 100644 --- a/public/app.js +++ b/public/app.js @@ -575,6 +575,7 @@ async function loadProtocols() { try { const data = await api("/api/protocols"); applyEditionPayload(data); + applyUiHiddenFromPayload(data); protoLabel.textContent = `Протокол: ${data.currentLabel || "AmneziaWG"}`; if (profileHintEl) { if (data.singleProfile && typeof data.profilesPersistHint === "string" && data.profilesPersistHint) { diff --git a/server.js b/server.js index f1e1856..6754961 100644 --- a/server.js +++ b/server.js @@ -2169,6 +2169,7 @@ app.get("/api/protocols", requireAuth, (req, res) => { singleProfile: PROFILES.length < 2, profilesPersistHint: hintSingle, edition: editionPayload(), + uiHidden: { ...effectiveUiHidden() }, }); });