Skip to content

Commit

Permalink
client-1.7.5: make small cosmetic changes to changelog subheader
Browse files Browse the repository at this point in the history
  • Loading branch information
r002 committed Dec 22, 2024
1 parent 38c0a79 commit 0e011a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[
{
"dt": "2024-12-22",
"version": "client-1.7.5",
"notes": [
"make small cosmetic changes to changelog subheader"
]
},
{
"dt": "2024-12-21",
"version": "client-1.7.4",
Expand Down
10 changes: 5 additions & 5 deletions js/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ async function renderDatalog() {
const d = new Date();
const freshness = calculateFreshness(latest, d.toISOString());
const syncTitle = `last data sync\n• ${convertToEasternTime(latest)}`;
document.getElementById("releasenotes").innerHTML += ` <a href="${LATEST_URL}" title="${syncTitle}">${freshness}</a>`;
document.getElementById("releasenotes").innerHTML += ` &nbsp;∾&nbsp; <a href="${LATEST_URL}" title="${syncTitle}">${freshness}</a>`;
}

async function renderServerChangelog() {
const ss = await fetch("https://r002.github.io/server/changelog.json");
const serverNotes = await ss.json();
const s = serverNotes[0]; // get the latest server release notes
const serverBuildTitle = `build ${s.version}\n${s.notes.map(note=>`• ${note}`).join("\n")}`;
const serverBuildTitle = `${s.version}${s.dt}\n${s.notes.map(note=>`• ${note}`).join("\n")}`;

document.getElementById("releasenotes").innerHTML += ` <a href="https://r002.github.io/server/changelog.json" title="${serverBuildTitle}">${s.version}${s.dt}</a>`;
document.getElementById("releasenotes").innerHTML += ` &nbsp;∾&nbsp; <a href="https://r002.github.io/server/changelog.json" title="${serverBuildTitle}">${s.version}</a>`;
}

async function renderClientChangelog() {
Expand All @@ -39,8 +39,8 @@ async function renderClientChangelog() {
if (r.bugs) {
bugs = `\n\nbugs:\n${r.bugs?.map(bug=>`• ${bug}`).join("\n")}`;
}
const clientBuildTitle = `build ${r.version}\n${r.notes.map(note=>`• ${note}`).join("\n")}${bugs}`;
document.getElementById("releasenotes").innerHTML = `<a href="../changelog.json" title="${clientBuildTitle}">${r.version}${r.dt}<a/>`;
const clientBuildTitle = `${r.version}${r.dt}\n${r.notes.map(note=>`• ${note}`).join("\n")}${bugs}`;
document.getElementById("releasenotes").innerHTML = `<a href="../changelog.json" title="${clientBuildTitle}">${r.version}<a/>`;
}

function convertToEasternTime(utcDateStr) {
Expand Down

0 comments on commit 0e011a4

Please sign in to comment.