feat: add settings page and theme toggle component

- Implemented a new SettingsPage component for user preferences including appearance, behavior, and account security settings.
- Added a ThemeToggle component to switch between light, dark, and system modes.
- Created reusable UI components: AlertDialog, Avatar, Badge, Button, Card, Dialog, Input, Label, Progress, ScrollArea, Separator, Sheet, Skeleton, Tooltip.
- Introduced utility functions for class name merging and formatting bytes/uptime.
- Added a custom hook for media query handling
This commit is contained in:
DrSmoothl committed 2026-05-05 00:39:52 +08:00
1 parent f52a84d53f
commit 1426d7adb2
65 files changed
+4687 -4530

No files matched your search

@@ -0,0 +1,32 @@
import * as React from 'react';
import { cn } from '@/lib/utils';
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
value?: number;
indicatorClassName?: string;
}
const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(
({ className, value = 0, indicatorClassName, ...props }, ref) => {
const clamped = Math.max(0, Math.min(100, value));
return (
<div
ref={ref}
role="progressbar"
aria-valuenow={clamped}
aria-valuemin={0}
aria-valuemax={100}
className={cn('relative h-2 w-full overflow-hidden rounded-full bg-muted', className)}
{...props}
>
<div
className={cn('h-full rounded-full bg-primary transition-[width] duration-500 ease-out', indicatorClassName)}
style={{ width: `${clamped}%` }}
/>
</div>
);
}
);
Progress.displayName = 'Progress';
export { Progress };