fix: copy button HTTP fallback, reset-admin-password in Docker, scripts volume

- CellNetwork.jsx CopyButton: use execCommand fallback when clipboard API
  is unavailable (HTTP non-localhost context)
- Makefile reset-admin-password: run inside cell-api container via docker exec
  so bcrypt and all deps are available without host installation
- docker-compose.yml: mount ./scripts:/app/scripts:ro in cell-api so the
  reset script is accessible inside the container
- scripts/reset_admin_password.py: auto-detect API module path and data dir
  so the script works in both host (api/ sibling) and container (/app) layouts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-01 11:34:38 -04:00
parent e8b3288a41
commit 56d677e925
4 changed files with 31 additions and 7 deletions
+11 -1
View File
@@ -23,7 +23,17 @@ const SERVICE_DEFS = [
function CopyButton({ text, small }) {
const [copied, setCopied] = useState(false);
const copy = () => {
navigator.clipboard.writeText(text);
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(text);
} else {
const el = document.createElement('textarea');
el.value = text;
el.style.cssText = 'position:fixed;opacity:0;top:0;left:0';
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
}
setCopied(true);
setTimeout(() => setCopied(false), 1500);
};