From 6c2698c106ff56fea2377bdd000e87b28151e076 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:32:45 +0300 Subject: [PATCH] fix(mtproto-ui): restore status fetch, trim promo footer ReferenceError fixed by awaiting /api/mtproto/status before using snap. Footer: GitHub-only; dropped Boosty/Ozon/Telegram. Removed advertiseHint from install JSON (hint remains on status). Co-authored-by: Cursor --- package.json | 2 +- public/app.js | 3 ++- public/index.html | 10 ++-------- server.js | 1 - 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 3de70ea..d68d8e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amnezia-admin", - "version": "1.2.16", + "version": "1.2.17", "private": true, "description": "amnezia_web — базовая панель AmneziaWG (FREE: просмотр и удаление клиентов; полная версия — PRO).", "license": "MIT", diff --git a/public/app.js b/public/app.js index c3fa592..a1ff828 100644 --- a/public/app.js +++ b/public/app.js @@ -366,6 +366,7 @@ async function refreshMtprotoPanel() { mtprotoBanner.textContent = ""; } try { + const s = await api("/api/mtproto/status"); if (mtprotoLogsTailEl) mtprotoLogsTailEl.textContent = typeof s.logsTail === "string" ? s.logsTail : ""; const parts = []; @@ -423,7 +424,6 @@ async function refreshMtprotoPanel() { const lines = []; if (typeof j.secretHex === "string") lines.push(`Секрет (сохраните): ${j.secretHex}`); if (typeof j.tgLink === "string" && j.tgLink) lines.push(`Ссылка: ${j.tgLink}`); - if (typeof j.advertiseHint === "string" && j.advertiseHint) lines.push(j.advertiseHint); if (mtprotoBanner) { mtprotoBanner.textContent = lines.join("\n"); mtprotoBanner.classList.remove("hidden"); @@ -481,6 +481,7 @@ async function refreshMtprotoPanel() { mtprotoActionsEl.appendChild(row); } catch (e) { + if (mtprotoLogsTailEl) mtprotoLogsTailEl.textContent = ""; const err = document.createElement("p"); err.className = "muted warp-muted err"; err.textContent = String(e.message || e); diff --git a/public/index.html b/public/index.html index 17618e5..e5593d0 100644 --- a/public/index.html +++ b/public/index.html @@ -220,16 +220,10 @@

- Открытая базовая сборка — AWG клиентов, удаление с сервера, MTProto‑прокси Telegram (Docker). Остальной PRO доступ — см. Boosty и плашку в интерфейсе. + Базовая панель: AWG‑клиенты, статусы и MTProto‑прокси (Docker) без сторонней интеграции Telegram‑ботов.

diff --git a/server.js b/server.js index f04065d..b724f50 100644 --- a/server.js +++ b/server.js @@ -2259,7 +2259,6 @@ app.post("/api/mtproto/install", requireAuth, (req, res) => { hostPort, tgLink, advertisedHost: adv, - advertiseHint: adv ? "" : "Задайте MTPRO_PUBLIC_HOST — иначе в Telegram нужно самим ввести IP и порт из таблицы.", snapshot: snap, }); } finally {