Require a private passphrase and loopback-or-token admin auth. New vaults use Argon2id; existing PBKDF2 vaults still open, and new snapshot metadata is encrypted. Wormhole tokens survive restart, offset uploads seal into the vault, and client-certificate uploads are real. Reject the command provider and keep Postgres passwords off the process arguments. Keep the interruptible canvas motion.
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { motion, type HTMLMotionProps } from "motion/react";
|
|
|
|
const variants = {
|
|
primary:
|
|
"text-star-100 border-wormhole-violet/40 [--button-color:var(--color-wormhole-violet)] [--button-rest:25%] [--button-hover:35%]",
|
|
ghost: "text-star-200 border-space-700 [--button-color:var(--color-space-800)] [--button-rest:60%] [--button-hover:100%]",
|
|
danger: "text-orbit-red border-orbit-red/35 [--button-color:var(--color-orbit-red)]",
|
|
success: "text-orbit-green border-orbit-green/35 [--button-color:var(--color-orbit-green)]",
|
|
warn: "text-orbit-amber border-orbit-amber/40 [--button-color:var(--color-orbit-amber)]",
|
|
};
|
|
|
|
export function Button({
|
|
variant = "ghost",
|
|
className = "",
|
|
...props
|
|
}: HTMLMotionProps<"button"> & {
|
|
variant?: keyof typeof variants;
|
|
}) {
|
|
return (
|
|
<motion.button
|
|
type="button"
|
|
className={`vault-button px-4 py-2.5 rounded-xl text-sm font-medium border disabled:opacity-40 ${variants[variant]} ${className}`}
|
|
initial={false}
|
|
animate={{ "--button-mix": "0%" }}
|
|
whileHover={{ "--button-mix": "100%" }}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|