From 1df8c99c475495666ba84481367148178870227e 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 05:58:58 +0300 Subject: [PATCH] fix: always show token field in FREE banner, remove conditional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Token input + "Установить PRO" button now renders unconditionally in community edition. Removed the else-branch with the "disabled" hint text entirely — the field is always present. Co-authored-by: Cursor --- package.json | 2 +- public/app.js | 13 +++---------- public/index.html | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 81cd8fc..67c1440 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amnezia-admin", - "version": "1.2.28", + "version": "1.2.29", "private": true, "description": "amnezia_web — базовая панель AmneziaWG (FREE: просмотр и удаление клиентов; полная версия — PRO).", "license": "MIT", diff --git a/public/app.js b/public/app.js index 25589af..9bba8fb 100644 --- a/public/app.js +++ b/public/app.js @@ -346,13 +346,13 @@ function applyEditionPayload(data) { wrap.append(textCol, cta); editionBanner.appendChild(wrap); - if (editionState.githubActivationAllowed) { + { const act = document.createElement("div"); act.className = "edition-banner-activation muted"; const cap = document.createElement("div"); cap.className = "edition-banner-act-title"; cap.textContent = - "Подписка получена и есть GitHub‑токен к приватному репозиторию? Запуск установки PRO с сервера (порт обычно сохранится; процесс см. журнал):"; + "Есть GitHub‑токен к приватному репозиторию PRO? Вставьте ниже — установка заменит FREE на PRO (порт сохранится):"; const row = document.createElement("div"); row.className = "edition-banner-act-row"; @@ -361,7 +361,7 @@ function applyEditionPayload(data) { inp.type = "password"; inp.autocomplete = "new-password"; inp.spellcheck = false; - inp.placeholder = "Токен (classic: repo или fine‑grained: Contents Read)"; + inp.placeholder = "GitHub PAT (classic: repo или fine‑grained: Contents Read)"; inp.className = "edition-banner-act-input monospace"; const go = document.createElement("button"); @@ -415,13 +415,6 @@ function applyEditionPayload(data) { act.append(cap, row, msg); if (preservedInstallLog) act.appendChild(preservedInstallLog); editionBanner.appendChild(act); - } else { - const hint = document.createElement("p"); - hint.className = "edition-banner-no-activation muted"; - hint.setAttribute("role", "note"); - hint.textContent = - "Владелец сервера отключил установку PRO из интерфейса (в контейнере задано ALLOW_COMMUNITY_GITHUB_ACTIVATION=0 или экв.). Уберите переменную или поставьте 1/true — и перезапустите контейнер панели."; - editionBanner.appendChild(hint); } } else { stopCommunityInstallLogPolling(); diff --git a/public/index.html b/public/index.html index 0d83f02..497b10a 100644 --- a/public/index.html +++ b/public/index.html @@ -7,7 +7,7 @@ - + +