1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

tunnel support, imperial units, admin ui bugfixes

This commit is contained in:
NoobishSVK
2024-09-26 15:07:40 +02:00
parent e0c085b789
commit 431dc7cedf
9 changed files with 124 additions and 64 deletions

View File

@@ -676,7 +676,7 @@ async function copyTx() {
const stationErp = $('#data-station-erp').text();
try {
await copyToClipboard(frequency + " - " + pi + " | " + stationName + " [" + stationCity + ", " + stationItu + "] - " + stationDistance + " km | " + stationErp + " kW");
await copyToClipboard(frequency + " - " + pi + " | " + stationName + " [" + stationCity + ", " + stationItu + "] - " + stationDistance + " | " + stationErp + " kW");
} catch (error) {
console.error(error);
}
@@ -878,8 +878,9 @@ const updateDataElements = throttle(function(parsedData) {
updateTextIfChanged($('#data-station-city'), parsedData.txInfo.city);
updateTextIfChanged($('#data-station-itu'), parsedData.txInfo.itu);
updateTextIfChanged($('#data-station-pol'), parsedData.txInfo.pol);
updateTextIfChanged($('#data-station-distance'), parsedData.txInfo.dist);
updateHtmlIfChanged($('#data-station-azimuth'), parsedData.txInfo.azi + '°');
const txDistance = localStorage.getItem('imperialUnits') == "true" ? (Number(parsedData.txInfo.dist) * 0.621371192).toFixed(0) + " mi" : parsedData.txInfo.dist + " km";
updateTextIfChanged($('#data-station-distance'), txDistance);
$dataStationContainer.css('display', 'block');
} else {
$dataStationContainer.removeAttr('style');