v2.5.3: fix disabled Update panel button
This commit is contained in:
@@ -228,6 +228,9 @@ GitHub Actions workflows in `.github/workflows/`:
|
|||||||
|
|
||||||
## 📋 Fix / changelog (this fork)
|
## 📋 Fix / changelog (this fork)
|
||||||
|
|
||||||
|
### v2.5.3
|
||||||
|
* **Fix gray Update panel button** — enabled by default; Docker installs allow in-container archive updates when `/app` is writable.
|
||||||
|
|
||||||
### v2.5.2
|
### v2.5.2
|
||||||
* **Tunnels UI redesign** — Settings → Tunnels: grouped layout (public access / outbound VPN), provider cards, status pills, responsive grid.
|
* **Tunnels UI redesign** — Settings → Tunnels: grouped layout (public access / outbound VPN), provider cards, status pills, responsive grid.
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ else:
|
|||||||
application_path = os.path.dirname(__file__)
|
application_path = os.path.dirname(__file__)
|
||||||
|
|
||||||
DATA_FILE = os.path.join(application_path, 'data.json') # legacy JSON; used only for one-shot import / export
|
DATA_FILE = os.path.join(application_path, 'data.json') # legacy JSON; used only for one-shot import / export
|
||||||
CURRENT_VERSION = "v2.5.2"
|
CURRENT_VERSION = "v2.5.3"
|
||||||
RELEASES_REPO_URL = repo_url()
|
RELEASES_REPO_URL = repo_url()
|
||||||
RELEASES_API_LATEST = api_latest_url()
|
RELEASES_API_LATEST = api_latest_url()
|
||||||
BIN_DIR = os.environ.get('TUNNEL_BIN_DIR', os.path.join(application_path, 'bin'))
|
BIN_DIR = os.environ.get('TUNNEL_BIN_DIR', os.path.join(application_path, 'bin'))
|
||||||
|
|||||||
@@ -105,7 +105,10 @@ class UpdateManager:
|
|||||||
return os.path.exists('/.dockerenv') or os.environ.get('PANEL_IN_DOCKER') == '1'
|
return os.path.exists('/.dockerenv') or os.environ.get('PANEL_IN_DOCKER') == '1'
|
||||||
|
|
||||||
def _docker_update_allowed(self) -> bool:
|
def _docker_update_allowed(self) -> bool:
|
||||||
return os.environ.get('PANEL_UPDATE_ALLOW_DOCKER', '').strip().lower() in ('1', 'true', 'yes')
|
if os.environ.get('PANEL_UPDATE_DISABLE_DOCKER', '').strip().lower() in ('1', 'true', 'yes'):
|
||||||
|
return False
|
||||||
|
# In-container archive updates are allowed by default when /app is writable.
|
||||||
|
return True
|
||||||
|
|
||||||
def _app_root_writable(self) -> bool:
|
def _app_root_writable(self) -> bool:
|
||||||
probe = os.path.join(self.app_root, '.panel_update_write_probe')
|
probe = os.path.join(self.app_root, '.panel_update_write_probe')
|
||||||
|
|||||||
@@ -1693,7 +1693,7 @@
|
|||||||
|
|
||||||
const upgradeBtn = document.getElementById('upgradePanelBtn');
|
const upgradeBtn = document.getElementById('upgradePanelBtn');
|
||||||
if (upgradeBtn) {
|
if (upgradeBtn) {
|
||||||
upgradeBtn.disabled = !data.can_auto_update;
|
upgradeBtn.disabled = false;
|
||||||
upgradeBtn.title = data.can_auto_update ? '' : (modeHint ? modeHint.textContent : '');
|
upgradeBtn.title = data.can_auto_update ? '' : (modeHint ? modeHint.textContent : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1702,9 +1702,7 @@
|
|||||||
statusDiv.style.border = '1px solid var(--success)';
|
statusDiv.style.border = '1px solid var(--success)';
|
||||||
downloadBtn.href = data.html_url || data.releases_url || 'https://git.evilfox.cc/test2/Amnezia-Web-Panel-main/releases';
|
downloadBtn.href = data.html_url || data.releases_url || 'https://git.evilfox.cc/test2/Amnezia-Web-Panel-main/releases';
|
||||||
downloadBtn.classList.remove('hidden');
|
downloadBtn.classList.remove('hidden');
|
||||||
if (data.can_auto_update) {
|
applyBtn.classList.remove('hidden');
|
||||||
applyBtn.classList.remove('hidden');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
statusDiv.innerHTML = `<span style="color: var(--text-muted);">{{ _('up_to_date')|default('Up to date') }}</span>`;
|
statusDiv.innerHTML = `<span style="color: var(--text-muted);">{{ _('up_to_date')|default('Up to date') }}</span>`;
|
||||||
statusDiv.style.border = '1px solid var(--border-color)';
|
statusDiv.style.border = '1px solid var(--border-color)';
|
||||||
|
|||||||
@@ -495,7 +495,7 @@
|
|||||||
"update_no_target": "No target version. Check for updates first.",
|
"update_no_target": "No target version. Check for updates first.",
|
||||||
"auto_update_hint": "Auto-update pulls the release tag from git.evilfox.cc (git checkout required).",
|
"auto_update_hint": "Auto-update pulls the release tag from git.evilfox.cc (git checkout required).",
|
||||||
"auto_update_ready": "Git auto-update is available for this install.",
|
"auto_update_ready": "Git auto-update is available for this install.",
|
||||||
"auto_update_docker": "Docker install: rebuild/pull image, or use a git checkout for one-click update.",
|
"auto_update_docker": "Docker: one-click update downloads the release ZIP into the container. Rebuild the image to persist across container recreation.",
|
||||||
"auto_update_manual": "One-click update needs a writable install directory or git clone. You can still download a release.",
|
"auto_update_manual": "One-click update needs a writable install directory or git clone. You can still download a release.",
|
||||||
"auto_update_archive": "One-click update downloads the release ZIP from git.evilfox.cc and restarts the panel.",
|
"auto_update_archive": "One-click update downloads the release ZIP from git.evilfox.cc and restarts the panel.",
|
||||||
"upgrade_panel": "Update panel",
|
"upgrade_panel": "Update panel",
|
||||||
|
|||||||
@@ -495,7 +495,7 @@
|
|||||||
"update_no_target": "Нет целевой версии. Сначала проверьте обновления.",
|
"update_no_target": "Нет целевой версии. Сначала проверьте обновления.",
|
||||||
"auto_update_hint": "Автообновление тянет тег релиза с git.evilfox.cc (нужен git clone панели).",
|
"auto_update_hint": "Автообновление тянет тег релиза с git.evilfox.cc (нужен git clone панели).",
|
||||||
"auto_update_ready": "Для этой установки доступно автообновление через git.",
|
"auto_update_ready": "Для этой установки доступно автообновление через git.",
|
||||||
"auto_update_docker": "Docker: пересоберите/подтяните образ или используйте git clone для обновления в один клик.",
|
"auto_update_docker": "Docker: обновление в один клик скачивает ZIP релиза в контейнер. Пересоберите образ, чтобы сохранить изменения при пересоздании контейнера.",
|
||||||
"auto_update_manual": "Обновление в один клик требует git clone или каталог с правами записи. Можно скачать релиз вручную.",
|
"auto_update_manual": "Обновление в один клик требует git clone или каталог с правами записи. Можно скачать релиз вручную.",
|
||||||
"auto_update_archive": "Обновление в один клик: скачивает ZIP релиза с git.evilfox.cc и перезапускает панель.",
|
"auto_update_archive": "Обновление в один клик: скачивает ZIP релиза с git.evilfox.cc и перезапускает панель.",
|
||||||
"upgrade_panel": "Обновить панель",
|
"upgrade_panel": "Обновить панель",
|
||||||
|
|||||||
Reference in New Issue
Block a user