1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-27 06:23:53 +01:00

Local database cache for TX ID

Locally cache transmitter database for TX ID and visually show when multiple matches on frontend
This commit is contained in:
Adam Wisher
2025-05-12 22:58:23 +01:00
parent 811ea4011d
commit 65fc84ff9f
5 changed files with 92 additions and 136 deletions

View File

@@ -119,6 +119,14 @@ label {
font-size: 20px;
}
#data-station-others span {
color: var(--color-main);
background: var(--color-4);
margin-left: 4px;
padding: 0 5px;
border-radius: 3px;
}
.highest-signal-container {
margin-bottom: -20px !important;
}

View File

@@ -287,7 +287,7 @@
<span id="data-station-city" style="font-size: 16px;"></span> <span class="text-small">[<span id="data-station-itu"></span>]</span>
</h4>
<span class="text-small">
<span id="data-station-erp"></span> kW [<span id="data-station-pol"></span>] <span class="text-gray">•</span> <span id="data-station-distance"></span> <span class="text-gray">•</span> <span id="data-station-azimuth"></span>
<span id="data-station-erp"></span> kW [<span id="data-station-pol"></span>] <span class="text-gray">•</span> <span id="data-station-distance"></span> <span class="text-gray">•</span> <span id="data-station-azimuth"></span> <span id="data-station-others"></span>
</span>
</div>
</div>

View File

@@ -976,6 +976,7 @@ const updateDataElements = throttle(function(parsedData) {
updateTextIfChanged($('#data-station-itu'), parsedData.txInfo.itu);
updateTextIfChanged($('#data-station-pol'), parsedData.txInfo.pol);
updateHtmlIfChanged($('#data-station-azimuth'), parsedData.txInfo.azi + '°');
updateHtmlIfChanged($('#data-station-others'), parsedData.txInfo.otherMatches > 0 ? ('<span>+' + parsedData.txInfo.otherMatches +'</span>') : '');
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');