feat: 更新仪表盘标题和描述,添加异常状态查询字段,优化管理员导航和API导出

This commit is contained in:
2026-05-11 16:57:01 +08:00
parent b539bf0660
commit d0f75fcec8
9 changed files with 887 additions and 32 deletions

View File

@@ -0,0 +1,34 @@
"use client";
import * as React from "react";
import { cn } from "@/lib/utils";
type ProgressProps = React.ComponentProps<"div"> & {
/** 0100 */
value?: number;
};
function Progress({ className, value = 0, ...props }: ProgressProps): React.ReactElement {
const pct = Math.min(100, Math.max(0, Number.isFinite(value) ? value : 0));
return (
<div
role="progressbar"
aria-valuenow={Math.round(pct)}
aria-valuemin={0}
aria-valuemax={100}
className={cn(
"relative h-2 w-full overflow-hidden rounded-full bg-muted",
className,
)}
{...props}
>
<div
className="h-full bg-primary transition-[width] duration-500 ease-out"
style={{ width: `${pct}%` }}
/>
</div>
);
}
export { Progress };