Minor tweaks

This commit is contained in:
Ian Renton
2025-10-06 21:11:59 +01:00
parent 6ee4fe288a
commit 2dcfae98f8
3 changed files with 9 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ SIGS = ["POTA", "SOTA", "WWFF", "GMA", "WWBOTA", "HEMA", "MOTA", "ARLHS", "SiOTA
# Modes. Note "DIGI" and "DIGITAL" are also supported but are normalised into "DATA". # Modes. Note "DIGI" and "DIGITAL" are also supported but are normalised into "DATA".
CW_MODES = ["CW"] CW_MODES = ["CW"]
PHONE_MODES = ["PHONE", "SSB", "USB", "LSB", "AM", "FM", "DV", "DMR", "DSTAR", "C4FM", "M17"] PHONE_MODES = ["PHONE", "SSB", "USB", "LSB", "AM", "FM", "DV", "DMR", "DSTAR", "C4FM", "M17"]
DATA_MODES = ["DATA", "FT8", "FT4", "RTTY", "SSTV", "JS8", "HELL", "BPSK", "PSK", "BPSK31", "OLIVIA"] DATA_MODES = ["DATA", "FT8", "FT4", "RTTY", "SSTV", "JS8", "HELL", "BPSK", "PSK", "PSK31", "BPSK31", "OLIVIA"]
ALL_MODES = CW_MODES + PHONE_MODES + DATA_MODES ALL_MODES = CW_MODES + PHONE_MODES + DATA_MODES
MODE_TYPES = ["CW", "PHONE", "DATA"] MODE_TYPES = ["CW", "PHONE", "DATA"]

View File

@@ -221,9 +221,11 @@ function updateRefreshDisplay() {
if (secSinceUpdate < REFRESH_INTERVAL_SEC) { if (secSinceUpdate < REFRESH_INTERVAL_SEC) {
count = REFRESH_INTERVAL_SEC - secSinceUpdate; count = REFRESH_INTERVAL_SEC - secSinceUpdate;
if (count <= 60) { if (count <= 60) {
updatingString = "Updating in " + count.toFixed(0) + " seconds..."; var number = count.toFixed(0);
updatingString = "Updating in " + number + " second" + (number != "1" ? "s" : "") + ".";
} else { } else {
updatingString = "Updating in " + Math.floor(count / 60.0).toFixed(0) + " minutes."; var number = Math.round(count / 60.0).toFixed(0);
updatingString = "Updating in " + number + " minute" + (number != "1" ? "s" : "") + ".";
} }
} }
$("#timing-container").text("Last updated at " + lastUpdateTime.format('HH:mm') + " UTC. " + updatingString); $("#timing-container").text("Last updated at " + lastUpdateTime.format('HH:mm') + " UTC. " + updatingString);

View File

@@ -315,9 +315,11 @@ function updateRefreshDisplay() {
if (secSinceUpdate < REFRESH_INTERVAL_SEC) { if (secSinceUpdate < REFRESH_INTERVAL_SEC) {
count = REFRESH_INTERVAL_SEC - secSinceUpdate; count = REFRESH_INTERVAL_SEC - secSinceUpdate;
if (count <= 60) { if (count <= 60) {
updatingString = "Updating in " + count.toFixed(0) + " seconds..."; var number = count.toFixed(0);
updatingString = "Updating in " + number + " second" + (number != "1" ? "s" : "") + ".";
} else { } else {
updatingString = "Updating in " + Math.floor(count / 60.0).toFixed(0) + " minutes."; var number = Math.round(count / 60.0).toFixed(0);
updatingString = "Updating in " + number + " minute" + (number != "1" ? "s" : "") + ".";
} }
} }
$("#timing-container").text("Last updated at " + lastUpdateTime.format('HH:mm') + " UTC. " + updatingString); $("#timing-container").text("Last updated at " + lastUpdateTime.format('HH:mm') + " UTC. " + updatingString);