Giant refactor to rebrand "SIG" as "Activity" anywhere that doesn't touch API or config file (which is to be addressed in a future breaking change). #147

This commit is contained in:
Ian Renton
2026-09-18 14:54:11 +01:00
parent 556ea56378
commit 81cd686a00
96 changed files with 1208 additions and 1170 deletions
+14 -14
View File
@@ -250,34 +250,34 @@ function addAlertRowsToTable(tbody, alerts) {
}
// Type, SIG or fallback to source
let sigTypeText = a["source"];
// Type, activity or fallback to source
let activityTypeText = a["source"];
if (a["alert_type"] === "CONTEST") {
sigTypeText = "Contest";
activityTypeText = "Contest";
} else if (a["alert_type"] === "DXPEDITION") {
sigTypeText = "DXpedition";
activityTypeText = "DXpedition";
} else if (a["alert_type"] === "SATELLITE") {
sigTypeText = "Satellite";
activityTypeText = "Satellite";
} else if (a["alert_type"] === "XOTA") {
if (a["sig"]) {
sigTypeText = a["sig"];
activityTypeText = a["sig"];
} else {
sigTypeText = "xOTA";
activityTypeText = "xOTA";
}
}
// Format sig_refs
let sig_refs = "";
// Format activity refs
let activityRefs = "";
if (a["sig_refs"] != null) {
const items = [];
for (let i = 0; i < a["sig_refs"].length; i++) {
if (a["sig_refs"][i]["url"] != null) {
items[i] = `<a href='${encodeURI(a["sig_refs"][i]["url"])}' title='${escapeHtml(a["sig_refs"][i]["name"])}' target='_new' class='sig-ref-link'>${escapeHtml(a["sig_refs"][i]["id"])}</a>`
items[i] = `<a href='${encodeURI(a["sig_refs"][i]["url"])}' title='${escapeHtml(a["sig_refs"][i]["name"])}' target='_new' class='activity-ref-link'>${escapeHtml(a["sig_refs"][i]["id"])}</a>`
} else {
items[i] = `${escapeHtml(a["sig_refs"][i]["id"])}`
}
}
sig_refs = items.join(", ");
activityRefs = items.join(", ");
}
// Populate the row
@@ -297,10 +297,10 @@ function addAlertRowsToTable(tbody, alerts) {
$tr.append(`<td class='hideonmobile'>${commentText}</td>`);
}
if (showType) {
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> ${sigTypeText}</td>`);
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> ${activityTypeText}</td>`);
}
if (showRef) {
$tr.append(`<td class='hideonmobile'>${sig_refs}</td>`);
$tr.append(`<td class='hideonmobile'>${activityRefs}</td>`);
}
tbody.append($tr);
@@ -318,7 +318,7 @@ function addAlertRowsToTable(tbody, alerts) {
$td2.append(`<span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> `);
}
if (showRef) {
$td2.append(`${sig_refs} `);
$td2.append(`${activityRefs} `);
}
if (showFreqsModes) {
$td2.append(`${freqsModesText} `);