mirror of
https://github.com/andrey271192/amnezia_web.git
synced 2026-09-20 14:41:59 +00:00
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 <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "amnezia-admin",
|
"name": "amnezia-admin",
|
||||||
"version": "1.2.16",
|
"version": "1.2.17",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "amnezia_web — базовая панель AmneziaWG (FREE: просмотр и удаление клиентов; полная версия — PRO).",
|
"description": "amnezia_web — базовая панель AmneziaWG (FREE: просмотр и удаление клиентов; полная версия — PRO).",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -366,6 +366,7 @@ async function refreshMtprotoPanel() {
|
|||||||
mtprotoBanner.textContent = "";
|
mtprotoBanner.textContent = "";
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
const s = await api("/api/mtproto/status");
|
||||||
if (mtprotoLogsTailEl) mtprotoLogsTailEl.textContent = typeof s.logsTail === "string" ? s.logsTail : "";
|
if (mtprotoLogsTailEl) mtprotoLogsTailEl.textContent = typeof s.logsTail === "string" ? s.logsTail : "";
|
||||||
|
|
||||||
const parts = [];
|
const parts = [];
|
||||||
@@ -423,7 +424,6 @@ async function refreshMtprotoPanel() {
|
|||||||
const lines = [];
|
const lines = [];
|
||||||
if (typeof j.secretHex === "string") lines.push(`Секрет (сохраните): ${j.secretHex}`);
|
if (typeof j.secretHex === "string") lines.push(`Секрет (сохраните): ${j.secretHex}`);
|
||||||
if (typeof j.tgLink === "string" && j.tgLink) lines.push(`Ссылка: ${j.tgLink}`);
|
if (typeof j.tgLink === "string" && j.tgLink) lines.push(`Ссылка: ${j.tgLink}`);
|
||||||
if (typeof j.advertiseHint === "string" && j.advertiseHint) lines.push(j.advertiseHint);
|
|
||||||
if (mtprotoBanner) {
|
if (mtprotoBanner) {
|
||||||
mtprotoBanner.textContent = lines.join("\n");
|
mtprotoBanner.textContent = lines.join("\n");
|
||||||
mtprotoBanner.classList.remove("hidden");
|
mtprotoBanner.classList.remove("hidden");
|
||||||
@@ -481,6 +481,7 @@ async function refreshMtprotoPanel() {
|
|||||||
|
|
||||||
mtprotoActionsEl.appendChild(row);
|
mtprotoActionsEl.appendChild(row);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if (mtprotoLogsTailEl) mtprotoLogsTailEl.textContent = "";
|
||||||
const err = document.createElement("p");
|
const err = document.createElement("p");
|
||||||
err.className = "muted warp-muted err";
|
err.className = "muted warp-muted err";
|
||||||
err.textContent = String(e.message || e);
|
err.textContent = String(e.message || e);
|
||||||
|
|||||||
@@ -220,16 +220,10 @@
|
|||||||
<div class="support-line">
|
<div class="support-line">
|
||||||
<strong class="support-title">amnezia_web</strong>
|
<strong class="support-title">amnezia_web</strong>
|
||||||
<span class="support-sep" aria-hidden="true">·</span>
|
<span class="support-sep" aria-hidden="true">·</span>
|
||||||
<a href="https://github.com/andrey271192/amnezia_web" target="_blank" rel="noopener noreferrer">⭐ GitHub</a>
|
<a href="https://github.com/andrey271192/amnezia_web" target="_blank" rel="noopener noreferrer">GitHub</a>
|
||||||
<span class="support-sep" aria-hidden="true">·</span>
|
|
||||||
<a href="https://boosty.to/andrey27/purchase/3906453?ssource=DIRECT&share=subscription_link" target="_blank" rel="noopener noreferrer">💖 Boosty · PRO</a>
|
|
||||||
<span class="support-sep" aria-hidden="true">·</span>
|
|
||||||
<a href="https://finance.ozon.ru/apps/sbp/ozonbankpay/019dc200-2a5d-7931-a619-782d285f6798" target="_blank" rel="noopener noreferrer">💳 Ozon СБП</a>
|
|
||||||
<span class="support-sep" aria-hidden="true">·</span>
|
|
||||||
<a href="https://t.me/lot_andrey" target="_blank" rel="noopener noreferrer">✉️ Telegram @lot_andrey</a>
|
|
||||||
</div>
|
</div>
|
||||||
<p class="support-blurb">
|
<p class="support-blurb">
|
||||||
Открытая базовая сборка — AWG клиентов, удаление с сервера, MTProto‑прокси Telegram (Docker). Остальной PRO доступ — см. Boosty и плашку в интерфейсе.
|
Базовая панель: AWG‑клиенты, статусы и MTProto‑прокси (Docker) без сторонней интеграции Telegram‑ботов.
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@@ -2259,7 +2259,6 @@ app.post("/api/mtproto/install", requireAuth, (req, res) => {
|
|||||||
hostPort,
|
hostPort,
|
||||||
tgLink,
|
tgLink,
|
||||||
advertisedHost: adv,
|
advertisedHost: adv,
|
||||||
advertiseHint: adv ? "" : "Задайте MTPRO_PUBLIC_HOST — иначе в Telegram нужно самим ввести IP и порт из таблицы.",
|
|
||||||
snapshot: snap,
|
snapshot: snap,
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user