From 4c4e0b33abba3ce94133a8e5b6c85f0da8dc1adb Mon Sep 17 00:00:00 2001 From: Developing-Gamer Date: Tue, 23 Jun 2026 15:39:06 -0700 Subject: [PATCH] Add secret key reveal controls and align copy fields with design inputs. Co-authored-by: Cursor --- .../src/components/ui/copy-field.tsx | 21 ++++++++++++++++++- apps/dashboard/src/components/ui/textarea.tsx | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/components/ui/copy-field.tsx b/apps/dashboard/src/components/ui/copy-field.tsx index a8945be55..a3458c14b 100644 --- a/apps/dashboard/src/components/ui/copy-field.tsx +++ b/apps/dashboard/src/components/ui/copy-field.tsx @@ -1,8 +1,12 @@ +"use client"; + +import React, { useState } from "react"; import { Input } from "./input"; import { Label } from "./label"; import { SimpleTooltip } from "./simple-tooltip"; import { Textarea } from "./textarea"; import { CopyButton } from "./copy-button"; +import { EyeIcon, EyeSlashIcon } from "@phosphor-icons/react"; export function CopyField(props: { value: string, @@ -11,12 +15,15 @@ export function CopyField(props: { monospace?: boolean, fixedSize?: boolean, initialCopied?: boolean, + isSecret?: boolean, } & ({ type: "textarea", height?: number, } | { type: "input", })) { + const [isRevealed, setIsRevealed] = useState(false); + return (
{props.label && ( @@ -43,12 +50,24 @@ export function CopyField(props: {
- + {props.isSecret && ( + + )} +
)}
diff --git a/apps/dashboard/src/components/ui/textarea.tsx b/apps/dashboard/src/components/ui/textarea.tsx index 60af5cd78..867b81262 100644 --- a/apps/dashboard/src/components/ui/textarea.tsx +++ b/apps/dashboard/src/components/ui/textarea.tsx @@ -10,7 +10,7 @@ const Textarea = forwardRefIfNeeded( return (