Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions frontend/src/components/copy-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,34 @@ export function DiscreteInput({
const finalShow = showState || !!show;
return (
<div className="relative">
<ClickToCopy value={value}>
<Input
type={finalShow ? "text" : "password"}
readOnly
value={finalShow ? value : "very-secure-password"}
className={cn("font-mono cursor-pointer", !show && "pr-8")}
/>
</ClickToCopy>
{!show ? (
<Button
variant="ghost"
size="icon-sm"
className="absolute right-1 top-1/2 -translate-y-1/2 opacity-50"
type="button"
onClick={() => setShowState(!showState)}
>
<Icon icon={showState ? faEye : faEyeSlash} />
</Button>
) : null}
<Input
type={finalShow ? "text" : "password"}
readOnly
value={finalShow ? value : "very-secure-password"}
className={cn("font-mono", !show ? "pr-16" : "pr-8")}
/>
<div className="absolute right-1 top-1/2 -translate-y-1/2 opacity-50 flex gap-1">
<ClickToCopy value={value}>
<Button variant="ghost" size="icon-sm" type="button">
<Icon icon={faCopy} />
</Button>
</ClickToCopy>
{!show ? (
<WithTooltip
content={finalShow ? "Hide" : "Show"}
trigger={
<Button
variant="ghost"
size="icon-sm"
type="button"
onClick={() => setShowState(!showState)}
>
<Icon icon={showState ? faEye : faEyeSlash} />
</Button>
}
/>
) : null}
</div>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { faQuestionCircle, faRailway, faVercel, Icon } from "@rivet-gg/icons";
import {
faPlus,
faQuestionCircle,
faRailway,
faVercel,
Icon,
} from "@rivet-gg/icons";
import { useInfiniteQuery } from "@tanstack/react-query";
import {
createFileRoute,
notFound,
Link as RouterLink,
useNavigate,
} from "@tanstack/react-router";
import { match } from "ts-pattern";
import { HelpDropdown } from "@/app/help-dropdown";
Expand Down Expand Up @@ -156,7 +161,10 @@ function Providers() {
size="lg"
className="min-w-32"
variant="outline"
></Button>
startIcon={<Icon icon={faPlus} />}
>
Add Provider
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem
Expand Down
Loading