feat: Integrate new dashboard design and components, remove old dashboard routes, and update dependencies.

This commit is contained in:
2026-02-10 15:00:11 +08:00
parent 1c2ef98dcd
commit 48cf6c44f5
82 changed files with 6896 additions and 261 deletions

View File

@@ -0,0 +1,60 @@
import {
Button as MantineButton,
type ButtonProps as MantineButtonProps,
} from "@mantine/core";
import { cn } from "./utils";
interface ButtonProps extends MantineButtonProps {
variant?:
| "default"
| "destructive"
| "outline"
| "secondary"
| "ghost"
| "link";
className?: string;
onClick?: React.MouseEventHandler<HTMLButtonElement>;
type?: "button" | "submit" | "reset";
}
const Button = ({ children, className, variant, ...props }: ButtonProps) => {
let mantineVariant: MantineButtonProps["variant"];
let mantineColor: MantineButtonProps["color"];
switch (variant) {
case "destructive":
mantineVariant = "filled";
mantineColor = "red";
break;
case "outline":
mantineVariant = "outline";
break;
case "secondary":
mantineVariant = "default";
break;
case "ghost":
mantineVariant = "subtle";
break;
case "link":
mantineVariant = "transparent";
mantineColor = "blue"; // Assuming primary maps to blue in Mantine for now
break;
default:
mantineVariant = "filled";
mantineColor = "blue"; // Assuming primary maps to blue in Mantine for now
break;
}
return (
<MantineButton
variant={mantineVariant}
color={mantineColor}
className={cn(className)}
{...props}
>
{children}
</MantineButton>
);
};
export { Button };