overhaul layout of release list

This commit is contained in:
Daniel Micay
2024-10-12 09:42:41 -04:00
parent c0f6100921
commit b61454e13c
3 changed files with 134 additions and 662 deletions

View File

@@ -6,11 +6,6 @@ const legacyFactoryDevices = new Set(["sunfish", "coral", "flame"]);
const channels = ["stable", "beta", "alpha"];
const delayMs = 1000 * 60 * 5;
function updateLink(link, text, url) {
link.innerText = text;
link.setAttribute("href", url);
}
async function updateReleases() {
const requests = [];
@@ -34,10 +29,10 @@ async function updateReleases() {
const release = document.getElementById(`${device}-${channel}`);
const links = release.getElementsByTagName("a");
updateLink(links[1], metadata[0], "#" + metadata[0]);
updateLink(links[2], factoryFilename, factoryUrl);
updateLink(links[3], factoryFilename + ".sig", factoryUrl + ".sig");
updateLink(links[4], updateFilename, updateUrl);
links[0].setAttribute("href", "#" + metadata[0]);
links[1].setAttribute("href", factoryUrl);
links[2].setAttribute("href", factoryUrl + ".sig");
links[3].setAttribute("href", updateUrl);
}));
}
}