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

@@ -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();