[feat](trx-frontend-http): add Clear button to APRS bar overlay
Small pill-shaped button in the header row, right-aligned. Clicking it delegates to the existing aprs-clear-btn, clearing history, the packet panel, and the bar in one shot. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -112,7 +112,7 @@ function updateAprsBar() {
|
||||
aprsBarOverlay.style.display = "none";
|
||||
return;
|
||||
}
|
||||
let html = '<div class="aprs-bar-header">APRS</div>';
|
||||
let html = '<div class="aprs-bar-header">APRS<button class="aprs-bar-clear" onclick="window.clearAprsBar()">Clear</button></div>';
|
||||
for (const pkt of okFrames) {
|
||||
const ts = pkt._ts ? `<span class="aprs-bar-time">${pkt._ts}</span>` : "";
|
||||
const call = `<span class="aprs-bar-call">${escapeMapHtml(pkt.srcCall)}</span>`;
|
||||
@@ -127,6 +127,9 @@ function updateAprsBar() {
|
||||
aprsBarOverlay.style.display = "flex";
|
||||
}
|
||||
window.updateAprsBar = updateAprsBar;
|
||||
window.clearAprsBar = function() {
|
||||
document.getElementById("aprs-clear-btn")?.click();
|
||||
};
|
||||
|
||||
function addAprsPacket(pkt) {
|
||||
const tag = pkt.crcOk ? "[APRS]" : "[APRS-CRC-FAIL]";
|
||||
|
||||
Reference in New Issue
Block a user