fix: always show token field in FREE banner, remove conditional

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 <cursoragent@cursor.com>
This commit is contained in:
Андрей Бобырев
2026-05-15 05:58:58 +03:00
parent 8e886d6547
commit 1df8c99c47
3 changed files with 6 additions and 13 deletions

View File

@@ -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",

View File

@@ -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 или finegrained: Contents Read)";
inp.placeholder = "GitHub PAT (classic: repo или finegrained: 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();

View File

@@ -7,7 +7,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/styles.css?v=1.2.28">
<link rel="stylesheet" href="/styles.css?v=1.2.29">
<script>
(function () {
try {
@@ -327,6 +327,6 @@
</div>
</dialog>
<script src="/app.js?v=1.2.28" type="module"></script>
<script src="/app.js?v=1.2.29" type="module"></script>
</body>
</html>