mirror of
https://github.com/henrygd/beszel.git
synced 2026-03-23 22:16:18 +01:00
- Add version exchange between hub and agent. - Introduce ConnectionManager for managing WebSocket and SSH connections. - Implement fingerprint generation and storage in agent. - Create expiry map package to store universal tokens. - Update config.yml configuration to include tokens. - Enhance system management with new methods for handling system states and alerts. - Update front-end components to support token / fingerprint management features. - Introduce utility functions for token generation and hub URL retrieval. Co-authored-by: nhas <jordanatararimu@gmail.com>
39 lines
1.1 KiB
Go
39 lines
1.1 KiB
Go
import { copyToClipboard } from "@/lib/utils"
|
|
import { Input } from "./input"
|
|
import { Trans } from "@lingui/react/macro"
|
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip"
|
|
import { CopyIcon } from "lucide-react"
|
|
import { Button } from "./button"
|
|
|
|
export function InputCopy({ value, id, name }: { value: string; id: string; name: string }) {
|
|
return (
|
|
<div className="relative">
|
|
<Input readOnly id={id} name={name} value={value} required></Input>
|
|
<div
|
|
className={
|
|
"h-6 w-24 bg-gradient-to-r rtl:bg-gradient-to-l from-transparent to-background to-65% absolute top-2 end-1 pointer-events-none"
|
|
}
|
|
></div>
|
|
<TooltipProvider delayDuration={100} disableHoverableContent>
|
|
<Tooltip>
|
|
<TooltipTrigger asChild>
|
|
<Button
|
|
type="button"
|
|
variant={"link"}
|
|
className="absolute end-0 top-0"
|
|
onClick={() => copyToClipboard(value)}
|
|
>
|
|
<CopyIcon className="size-4" />
|
|
</Button>
|
|
</TooltipTrigger>
|
|
<TooltipContent>
|
|
<p>
|
|
<Trans>Click to copy</Trans>
|
|
</p>
|
|
</TooltipContent>
|
|
</Tooltip>
|
|
</TooltipProvider>
|
|
</div>
|
|
)
|
|
}
|