mirror of
https://github.com/andrey271192/amnezia_web.git
synced 2026-09-20 14:41:59 +00:00
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:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "amnezia-admin",
|
"name": "amnezia-admin",
|
||||||
"version": "1.2.28",
|
"version": "1.2.29",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "amnezia_web — базовая панель AmneziaWG (FREE: просмотр и удаление клиентов; полная версия — PRO).",
|
"description": "amnezia_web — базовая панель AmneziaWG (FREE: просмотр и удаление клиентов; полная версия — PRO).",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -346,13 +346,13 @@ function applyEditionPayload(data) {
|
|||||||
wrap.append(textCol, cta);
|
wrap.append(textCol, cta);
|
||||||
editionBanner.appendChild(wrap);
|
editionBanner.appendChild(wrap);
|
||||||
|
|
||||||
if (editionState.githubActivationAllowed) {
|
{
|
||||||
const act = document.createElement("div");
|
const act = document.createElement("div");
|
||||||
act.className = "edition-banner-activation muted";
|
act.className = "edition-banner-activation muted";
|
||||||
const cap = document.createElement("div");
|
const cap = document.createElement("div");
|
||||||
cap.className = "edition-banner-act-title";
|
cap.className = "edition-banner-act-title";
|
||||||
cap.textContent =
|
cap.textContent =
|
||||||
"Подписка получена и есть GitHub‑токен к приватному репозиторию? Запуск установки PRO с сервера (порт обычно сохранится; процесс см. журнал):";
|
"Есть GitHub‑токен к приватному репозиторию PRO? Вставьте ниже — установка заменит FREE на PRO (порт сохранится):";
|
||||||
|
|
||||||
const row = document.createElement("div");
|
const row = document.createElement("div");
|
||||||
row.className = "edition-banner-act-row";
|
row.className = "edition-banner-act-row";
|
||||||
@@ -361,7 +361,7 @@ function applyEditionPayload(data) {
|
|||||||
inp.type = "password";
|
inp.type = "password";
|
||||||
inp.autocomplete = "new-password";
|
inp.autocomplete = "new-password";
|
||||||
inp.spellcheck = false;
|
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";
|
inp.className = "edition-banner-act-input monospace";
|
||||||
|
|
||||||
const go = document.createElement("button");
|
const go = document.createElement("button");
|
||||||
@@ -415,13 +415,6 @@ function applyEditionPayload(data) {
|
|||||||
act.append(cap, row, msg);
|
act.append(cap, row, msg);
|
||||||
if (preservedInstallLog) act.appendChild(preservedInstallLog);
|
if (preservedInstallLog) act.appendChild(preservedInstallLog);
|
||||||
editionBanner.appendChild(act);
|
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 {
|
} else {
|
||||||
stopCommunityInstallLogPolling();
|
stopCommunityInstallLogPolling();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<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 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>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
try {
|
try {
|
||||||
@@ -327,6 +327,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
<script src="/app.js?v=1.2.28" type="module"></script>
|
<script src="/app.js?v=1.2.29" type="module"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user