fix(dashboard): guard clipboard copy in non-secure contexts

Address review feedback from gemini-code-assist on SecretsTab.tsx: guard the
copy button on navigator.clipboard so it is disabled and a no-op when the API
is unavailable (plain-HTTP contexts), instead of throwing a TypeError.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
Myasnikov DaniilandClaude Opus 4.8 committed 2026-06-23 12:22:40 +05:00
1 parent 83a8479169
commit ea0c0ab1a3
1 file changed
+2 -2
@@ -96,8 +96,8 @@ function SecretRow({
</button>
<button
type="button"
disabled={!revealed}
onClick={() => navigator.clipboard.writeText(fullValue)}
disabled={!revealed || !navigator.clipboard}
onClick={() => navigator.clipboard?.writeText(fullValue)}
className="rounded p-1 text-slate-500 hover:bg-slate-100 disabled:opacity-30"
title="Copy"
>