diff --git a/src/main/resources/static/js/githubVersion.js b/src/main/resources/static/js/githubVersion.js index eebb0ae88..2aef90d8c 100644 --- a/src/main/resources/static/js/githubVersion.js +++ b/src/main/resources/static/js/githubVersion.js @@ -57,13 +57,17 @@ async function checkForUpdate() { // Initialize the update button as hidden var updateBtn = document.getElementById("update-btn") || null; var updateLink = document.getElementById("update-link") || null; + var updateLinkLegacy = document.getElementById("update-link-legacy") || null; if (updateBtn !== null) { updateBtn.style.display = "none"; } if (updateLink !== null) { + updateLink.style.display = "none"; + } + if (updateLinkLegacy !== null) { console.log("hidden!"); - if (!updateLink.classList.contains("visually-hidden")) { - updateLink.classList.add("visually-hidden"); + if (!updateLinkLegacy.classList.contains("visually-hidden")) { + updateLinkLegacy.classList.add("visually-hidden"); } } @@ -76,16 +80,19 @@ async function checkForUpdate() { document.getElementById("update-btn").style.display = "block"; } if (updateLink !== null) { + document.getElementById("update-link").style.display = "flex"; + } + if (updateLinkLegacy !== null) { document.getElementById("app-update").innerHTML = updateAvailable.replace("{0}", '' + currentVersion + '').replace("{1}", '' + latestVersion + ''); - if (updateLink.classList.contains("visually-hidden")) { - updateLink.classList.remove("visually-hidden"); + if (updateLinkLegacy.classList.contains("visually-hidden")) { + updateLinkLegacy.classList.remove("visually-hidden"); } } console.log("visible"); } else { - if (updateLink !== null) { - if (!updateLink.classList.contains("visually-hidden")) { - updateLink.classList.add("visually-hidden"); + if (updateLinkLegacy !== null) { + if (!updateLinkLegacy.classList.contains("visually-hidden")) { + updateLinkLegacy.classList.add("visually-hidden"); } } console.log("hidden"); diff --git a/src/main/resources/static/js/homecard.js b/src/main/resources/static/js/homecard.js index 09d5a8cbd..891706605 100644 --- a/src/main/resources/static/js/homecard.js +++ b/src/main/resources/static/js/homecard.js @@ -73,12 +73,6 @@ function reorderCards(container) { cards.sort(function (a, b) { var aIsFavorite = localStorage.getItem(a.id) === 'favorite'; var bIsFavorite = localStorage.getItem(b.id) === 'favorite'; - if (a.id === 'update-link') { - return -1; - } - if (b.id === 'update-link') { - return 1; - } if (aIsFavorite && !bIsFavorite) { return -1; diff --git a/src/main/resources/templates/home-legacy.html b/src/main/resources/templates/home-legacy.html index e1f2ee364..0d57f8df7 100644 --- a/src/main/resources/templates/home-legacy.html +++ b/src/main/resources/templates/home-legacy.html @@ -55,8 +55,7 @@