From 0eb52c6a9edbe10abb4e9aec7ffe95db0f4dfc06 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Wed, 13 May 2026 18:30:16 -0400 Subject: [PATCH] imaging: copy button HTTP fallback (execCommand) navigator.clipboard.writeText is gated on isSecureContext - HTTPS or localhost only. PXE dashboard is served over plain HTTP (10.9.100.1:9009) so the API was undefined and the chain threw before .catch fired - user saw nothing. Wrap clipboard write in copyText() that prefers the modern API and falls back to the classic invisible-textarea + document.execCommand('copy') path which works on HTTP. Visual flash logic moved into flashCopied() for reuse. Co-Authored-By: Claude Opus 4.7 (1M context) --- webapp/templates/imaging.html | 53 +++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/webapp/templates/imaging.html b/webapp/templates/imaging.html index 4c15007..378e5e7 100644 --- a/webapp/templates/imaging.html +++ b/webapp/templates/imaging.html @@ -138,14 +138,36 @@ Content-Type: application/json {% block extra_scripts %} {% endblock %}