Move icons back into SIG data

This commit is contained in:
Ian Renton
2026-08-31 17:31:13 +01:00
parent 12e9b6a4ca
commit d83a979e46
18 changed files with 76 additions and 72 deletions
+13
View File
@@ -285,6 +285,19 @@ function callWanted(call) {
}
}
// Get the Font Awesome icon for a given SIG. If the SIG is unknown, the provided default symbol will be returned
// The sig is provided by name as a string, while all_sigs contains all the SIG info from the options call. This
// is because sometimes the sig name arrives via a spot and therefore we need to look up the rest of the SIG data
// separately.
function sigToIcon(sig, all_sigs, defaultIcon) {
if (sig) {
const match = all_sigs.find((check_sig) => check_sig["name"].toUpperCase() === sig.toUpperCase());
if (match) {
return match["icon"];
}
}
return defaultIcon;
}
// Startup
$(document).ready(function () {