[feat](trx-frontend-http): add rds raw json copy action

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-02-28 15:51:08 +01:00
parent 6dc26e48a3
commit ea6830e343
3 changed files with 26 additions and 1 deletions
@@ -3269,6 +3269,21 @@ async function copyRdsPsToClipboard() {
}
}
async function copyRdsRawToClipboard() {
const rawEl = document.getElementById("rds-raw");
const rawText = rawEl?.textContent ?? "";
if (!rawText || rawText === "--") {
showHint("No RDS JSON", 1200);
return;
}
try {
await navigator.clipboard.writeText(rawText);
showHint("RDS JSON copied", 1200);
} catch (_) {
showHint("Clipboard failed", 1500);
}
}
if (rdsPsOverlay) {
rdsPsOverlay.addEventListener("click", () => { copyRdsPsToClipboard(); });
}
@@ -3276,6 +3291,10 @@ const rdsPsValueEl = document.getElementById("rds-ps");
if (rdsPsValueEl) {
rdsPsValueEl.addEventListener("click", () => { copyRdsPsToClipboard(); });
}
const rdsRawCopyBtn = document.getElementById("rds-raw-copy-btn");
if (rdsRawCopyBtn) {
rdsRawCopyBtn.addEventListener("click", () => { copyRdsRawToClipboard(); });
}
function updateRdsPsOverlay(rds) {
// Overview strip overlay