[feat](trx-frontend-http): add Clear button to APRS decode panel
Clears the packet list, map markers are unaffected. Also wipes the persisted packet history from localStorage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -146,6 +146,7 @@
|
||||
<div id="subtab-aprs" class="sub-tab-panel" style="display:none;">
|
||||
<div class="aprs-controls">
|
||||
<button id="aprs-toggle-btn" type="button">Start APRS</button>
|
||||
<button id="aprs-clear-btn" type="button">Clear</button>
|
||||
<small id="aprs-status" style="color:var(--text-muted);">Stopped</small>
|
||||
</div>
|
||||
<div id="aprs-packets"></div>
|
||||
|
||||
@@ -634,6 +634,12 @@ aprsToggleBtn.addEventListener("click", () => {
|
||||
if (aprsActive) { stopAprs(true); } else { startAprs(); }
|
||||
});
|
||||
|
||||
document.getElementById("aprs-clear-btn").addEventListener("click", () => {
|
||||
aprsPacketsEl.innerHTML = "";
|
||||
aprsPacketHistory = [];
|
||||
saveSetting("aprsPackets", []);
|
||||
});
|
||||
|
||||
// Restore saved packets and map markers on page load
|
||||
for (let i = aprsPacketHistory.length - 1; i >= 0; i--) {
|
||||
const pkt = aprsPacketHistory[i];
|
||||
|
||||
Reference in New Issue
Block a user