mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
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:
+14
-14
@@ -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} `);
|
||||
|
||||
Reference in New Issue
Block a user