diff --git a/app/static/js/app.js b/app/static/js/app.js index 845d118..4d5f265 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -1352,12 +1352,21 @@ async function checkForAppUpdates() { // Check if remote update is available const updaterStatus = await fetch('/api/updater/status').then(r => r.json()).catch(() => ({ available: false })); + const updateLinkContainer = document.getElementById('updateLinkContainer'); + const newVersion = `${data.latest_date}+${data.latest_commit}`; + const githubUrl = data.github_url; if (updaterStatus.available) { - // Show "Update Now" link that opens modal - versionText.innerHTML = `${data.current_version} Update now`; + // Show "Update Now" link below version + if (updateLinkContainer) { + updateLinkContainer.innerHTML = ` Update now`; + updateLinkContainer.classList.remove('d-none'); + } } else { // Show link to GitHub (no remote update available) - versionText.innerHTML = `${data.current_version} Update available`; + if (updateLinkContainer) { + updateLinkContainer.innerHTML = ` Update available`; + updateLinkContainer.classList.remove('d-none'); + } } icon.className = 'bi bi-check-circle-fill text-success'; showNotification(`Update available: ${data.latest_date}+${data.latest_commit}`, 'success'); @@ -1396,7 +1405,7 @@ let pendingUpdateVersion = null; /** * Open update modal and prepare for remote update */ -function openUpdateModal(newVersion) { +function openUpdateModal(newVersion, githubUrl) { pendingUpdateVersion = newVersion; // Close offcanvas menu @@ -1412,6 +1421,14 @@ function openUpdateModal(newVersion) { document.getElementById('updateReloadBtn').classList.add('d-none'); document.getElementById('updateMessage').textContent = `New version available: ${newVersion}`; + // Set up "What's new" link + const whatsNewEl = document.getElementById('updateWhatsNew'); + if (whatsNewEl && githubUrl) { + const link = whatsNewEl.querySelector('a'); + if (link) link.href = githubUrl; + whatsNewEl.classList.remove('d-none'); + } + // Hide spinner, show message document.querySelector('#updateStatus .spinner-border').classList.add('d-none'); diff --git a/app/templates/base.html b/app/templates/base.html index 47d6f17..c8eb5f2 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -58,14 +58,17 @@
Menu
-
- - {{ version }} - {{ git_branch }} - - +
+
+ + {{ version }} + {{ git_branch }} + + +
+
@@ -343,6 +346,7 @@ Loading...

Checking for updates...

+

What's new?

diff --git a/scripts/updater/install.sh b/scripts/updater/install.sh index 30ae560..365f054 100755 --- a/scripts/updater/install.sh +++ b/scripts/updater/install.sh @@ -136,6 +136,6 @@ echo "The update webhook is now running on port 5050." echo "You can now use the 'Update' button in mc-webui GUI." echo "" echo "Useful commands:" -echo " systemctl status $SERVICE_NAME # Check status" -echo " journalctl -u $SERVICE_NAME -f # View logs" -echo " sudo $0 --uninstall # Uninstall" +echo " systemctl status $SERVICE_NAME # Check status" +echo " sudo journalctl -u $SERVICE_NAME -f # View logs" +echo " sudo $0 --uninstall # Uninstall"