Skip to content

Commit

Permalink
mark drafts and pre-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasbrett committed Jan 8, 2025
1 parent 4ad3e08 commit 1d790fd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ <h1>Install Voice PE Latest Firmware</h1>
}

const releases = await response.json();
const versions = releases.map(release => release.tag_name);

const e = document.getElementById("releases");
e.innerHTML = "";
Expand All @@ -96,10 +95,16 @@ <h1>Install Voice PE Latest Firmware</h1>
defaultOption.value = "";
e.appendChild(defaultOption);

versions.forEach(version => {
releases.forEach(release => {
const option = document.createElement("option");
option.text = version;
option.value = version;
option.text = release.tag_name;
option.value = release.tag_name;

if (release.draft) {
option.text += " (draft)";
} else if (release.prerelease) {
option.text += " (pre-release)";
}
e.appendChild(option);
});

Expand Down

0 comments on commit 1d790fd

Please sign in to comment.