Skip to content

Commit ea0c0ab

Browse files
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) <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent 83a8479 commit ea0c0ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/system/dashboard/images/console/apps/console/src/routes/detail

‎packages/system/dashboard/images/console/apps/console/src/routes/detail/SecretsTab.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ function SecretRow({
9696
</button>
9797
<button
9898
type="button"
99-
disabled={!revealed}
100-
onClick={() => navigator.clipboard.writeText(fullValue)}
99+
disabled={!revealed || !navigator.clipboard}
100+
onClick={() => navigator.clipboard?.writeText(fullValue)}
101101
className="rounded p-1 text-slate-500 hover:bg-slate-100 disabled:opacity-30"
102102
title="Copy"
103103
>

0 commit comments

Comments
 (0)