diff --git a/public/index.html b/public/index.html index 71e004a..18ca109 100644 --- a/public/index.html +++ b/public/index.html @@ -545,7 +545,7 @@
-

Transmission RSS Manager v2.0.6

+

Transmission RSS Manager v2.0.10

GitHub | About

@@ -592,6 +592,26 @@

Version History

+
+
v2.0.10 - March 2025
+
    +
  • Fixed: fs.existsSync error in update check
  • +
  • Fixed: Update button now stays visible when update is available
  • +
  • Fixed: Footer version now shows correct running version
  • +
  • Improved: Better error handling for git repository checks
  • +
  • Improved: More robust file system operations for update detection
  • +
+
+
+
v2.0.9 - March 2025
+
    +
  • Fixed: Update button now appears properly on dashboard
  • +
  • Fixed: Remote Transmission connection issues resolved
  • +
  • Fixed: Improved connection test with better error handling
  • +
  • Added: System status and update endpoints for version checking
  • +
  • Improved: Update detection and notification on dashboard
  • +
+
v2.0.6 - March 2025
    @@ -638,7 +658,7 @@
-

Transmission RSS Manager v2.0.0

+

Transmission RSS Manager v2.0.10

© 2025 PowerData.dk - All Rights Reserved

Visit PowerData.dk

diff --git a/public/js/system-status.js b/public/js/system-status.js index 89e569a..fce6125 100644 --- a/public/js/system-status.js +++ b/public/js/system-status.js @@ -22,9 +22,22 @@ function initSystemStatus() { .then(handleResponse) .then(data => { if (data.status === 'success') { + // Update version display versionElement.textContent = data.data.version; uptimeElement.textContent = data.data.uptime; + // Also update footer version + const footerVersion = document.getElementById('footer-version'); + if (footerVersion) { + footerVersion.textContent = 'v' + data.data.version; + } + + // Update version in about modal too if it exists + const aboutVersionElement = document.querySelector('.text-center.mt-4 strong'); + if (aboutVersionElement && aboutVersionElement.textContent.includes('Transmission RSS Manager v')) { + aboutVersionElement.textContent = 'Transmission RSS Manager v' + data.data.version; + } + // Update transmission status with icon if (data.data.transmissionStatus === 'Connected') { transmissionStatusElement.innerHTML = ' Connected'; @@ -41,10 +54,19 @@ function initSystemStatus() { }); } + // Track update check status + let updateAvailable = false; + let updateCheckInProgress = false; + // Check for updates function checkForUpdates() { + // Don't hide update button if an update is available and we're just refreshing + if (!updateAvailable) { + updateAvailableDiv.classList.add('d-none'); + } + updateStatusElement.innerHTML = ' Checking...'; - updateAvailableDiv.classList.add('d-none'); + updateCheckInProgress = true; // Add test=true parameter to force update availability for testing const testMode = localStorage.getItem('showUpdateButton') === 'true'; @@ -53,6 +75,7 @@ function initSystemStatus() { // Set a timeout to detect network issues const timeoutId = setTimeout(() => { updateStatusElement.innerHTML = ' Check timed out'; + updateCheckInProgress = false; showNotification('Update check timed out. Please try again later.', 'warning'); }, 10000); // 10 second timeout @@ -77,22 +100,29 @@ function initSystemStatus() { return response.json(); }) .then(data => { + updateCheckInProgress = false; + clearTimeout(timeoutId); + if (data.status === 'success') { if (data.data && data.data.updateAvailable) { + updateAvailable = true; updateStatusElement.innerHTML = ' Update available'; updateAvailableDiv.classList.remove('d-none'); updateAvailableDiv.querySelector('span').textContent = `A new version is available: ${data.data.currentVersion} → ${data.data.remoteVersion}`; } else { + updateAvailable = false; updateStatusElement.innerHTML = ' Up to date'; } } else { // Error status but with a response + updateAvailable = false; updateStatusElement.innerHTML = ' Check failed'; showNotification(data.message || 'Failed to check for updates', 'danger'); } }) .catch(error => { + updateCheckInProgress = false; clearTimeout(timeoutId); console.error('Error checking for updates:', error); updateStatusElement.innerHTML = ' Check failed';