diff --git a/README.md b/README.md index 2018b05..87a2727 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,9 @@ GitHub Actions workflows in `.github/workflows/`: ## πŸ“‹ 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 * **Tunnels UI redesign** β€” Settings β†’ Tunnels: grouped layout (public access / outbound VPN), provider cards, status pills, responsive grid. diff --git a/app.py b/app.py index 6f601b6..30b1d02 100644 --- a/app.py +++ b/app.py @@ -102,7 +102,7 @@ else: application_path = os.path.dirname(__file__) 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_API_LATEST = api_latest_url() BIN_DIR = os.environ.get('TUNNEL_BIN_DIR', os.path.join(application_path, 'bin')) diff --git a/managers/update_manager.py b/managers/update_manager.py index a9c34f3..220d732 100644 --- a/managers/update_manager.py +++ b/managers/update_manager.py @@ -105,7 +105,10 @@ class UpdateManager: return os.path.exists('/.dockerenv') or os.environ.get('PANEL_IN_DOCKER') == '1' 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: probe = os.path.join(self.app_root, '.panel_update_write_probe') diff --git a/templates/settings.html b/templates/settings.html index 15d5bfc..0956620 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -1693,7 +1693,7 @@ const upgradeBtn = document.getElementById('upgradePanelBtn'); if (upgradeBtn) { - upgradeBtn.disabled = !data.can_auto_update; + upgradeBtn.disabled = false; upgradeBtn.title = data.can_auto_update ? '' : (modeHint ? modeHint.textContent : ''); } @@ -1702,9 +1702,7 @@ 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.classList.remove('hidden'); - if (data.can_auto_update) { - applyBtn.classList.remove('hidden'); - } + applyBtn.classList.remove('hidden'); } else { statusDiv.innerHTML = `{{ _('up_to_date')|default('Up to date') }}`; statusDiv.style.border = '1px solid var(--border-color)'; diff --git a/translations/en.json b/translations/en.json index 185b401..7594bc2 100644 --- a/translations/en.json +++ b/translations/en.json @@ -495,7 +495,7 @@ "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_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_archive": "One-click update downloads the release ZIP from git.evilfox.cc and restarts the panel.", "upgrade_panel": "Update panel", diff --git a/translations/ru.json b/translations/ru.json index 889b99b..a9481c7 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -495,7 +495,7 @@ "update_no_target": "НСт Ρ†Π΅Π»Π΅Π²ΠΎΠΉ вСрсии. Π‘Π½Π°Ρ‡Π°Π»Π° ΠΏΡ€ΠΎΠ²Π΅Ρ€ΡŒΡ‚Π΅ обновлСния.", "auto_update_hint": "АвтообновлСниС тянСт Ρ‚Π΅Π³ Ρ€Π΅Π»ΠΈΠ·Π° с git.evilfox.cc (Π½ΡƒΠΆΠ΅Π½ git clone ΠΏΠ°Π½Π΅Π»ΠΈ).", "auto_update_ready": "Для этой установки доступно Π°Π²Ρ‚ΠΎΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ Ρ‡Π΅Ρ€Π΅Π· git.", - "auto_update_docker": "Docker: пСрСсобСритС/подтянитС ΠΎΠ±Ρ€Π°Π· ΠΈΠ»ΠΈ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ git clone для обновлСния Π² ΠΎΠ΄ΠΈΠ½ ΠΊΠ»ΠΈΠΊ.", + "auto_update_docker": "Docker: ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ Π² ΠΎΠ΄ΠΈΠ½ ΠΊΠ»ΠΈΠΊ скачиваСт ZIP Ρ€Π΅Π»ΠΈΠ·Π° Π² ΠΊΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€. ΠŸΠ΅Ρ€Π΅ΡΠΎΠ±Π΅Ρ€ΠΈΡ‚Π΅ ΠΎΠ±Ρ€Π°Π·, Ρ‡Ρ‚ΠΎΠ±Ρ‹ ΡΠΎΡ…Ρ€Π°Π½ΠΈΡ‚ΡŒ измСнСния ΠΏΡ€ΠΈ пСрСсоздании ΠΊΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€Π°.", "auto_update_manual": "ОбновлСниС Π² ΠΎΠ΄ΠΈΠ½ ΠΊΠ»ΠΈΠΊ Ρ‚Ρ€Π΅Π±ΡƒΠ΅Ρ‚ git clone ΠΈΠ»ΠΈ ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³ с ΠΏΡ€Π°Π²Π°ΠΌΠΈ записи. МоТно ΡΠΊΠ°Ρ‡Π°Ρ‚ΡŒ Ρ€Π΅Π»ΠΈΠ· Π²Ρ€ΡƒΡ‡Π½ΡƒΡŽ.", "auto_update_archive": "ОбновлСниС Π² ΠΎΠ΄ΠΈΠ½ ΠΊΠ»ΠΈΠΊ: скачиваСт ZIP Ρ€Π΅Π»ΠΈΠ·Π° с git.evilfox.cc ΠΈ пСрСзапускаСт панСль.", "upgrade_panel": "ΠžΠ±Π½ΠΎΠ²ΠΈΡ‚ΡŒ панСль",