Remove duplication

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König
2023-10-11 22:19:11 +02:00
parent d4d07f766a
commit 5cd83cfa24

View File

@@ -513,23 +513,17 @@ function updateVersionInfo() {
"</a>"; "</a>";
if (versionCompare(v.local, v.remote) === -1) { if (versionCompare(v.local, v.remote) === -1) {
// Update available // Update available
$("#versions").append( updateAvailable = true;
"<li><strong>" +
v.name +
"</strong> " +
localVersion +
'&middot; <a class="lookatme" lookatme-text="Update available!" href="' +
v.url +
'" rel="noopener" target="_blank">Update available!</a></li>'
);
} else {
$("#versions").append("<li><strong>" + v.name + "</strong> " + localVersion + "</li>");
}
} else { } else {
// non-master branch // non-master branch
localVersion = "vDev (" + v.branch + ", " + v.hash + ")"; localVersion = "vDev (" + v.branch + ", " + v.hash + ")";
if (v.hash != v.hash_remote) { if (v.hash != v.hash_remote) {
// hash differ > Update available // hash differ > Update available
updateAvailable = true;
}
}
}
if (updateAvailable) {
$("#versions").append( $("#versions").append(
"<li><strong>" + "<li><strong>" +
v.name + v.name +
@@ -543,7 +537,6 @@ function updateVersionInfo() {
$("#versions").append("<li><strong>" + v.name + "</strong> " + localVersion + "</li>"); $("#versions").append("<li><strong>" + v.name + "</strong> " + localVersion + "</li>");
} }
} }
}
}); });
if (dockerUpdate) if (dockerUpdate)