"use client" import { useTranslations } from "next-intl" import { Database } from "lucide-react" import { type ReactElement } from "react" import { Input } from "@/shared/components/ui/input" import { Label } from "@/shared/components/ui/label" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/shared/components/ui/card" export interface FileUploadValues { maxFileSize: number allowedTypes: string } interface FileUploadCardProps { values: FileUploadValues onChange: (key: keyof FileUploadValues, value: number | string) => void } /** * 管理员系统设置 - 文件上传卡片 */ export function FileUploadCard({ values, onChange }: FileUploadCardProps): ReactElement { const t = useTranslations("settings.admin.fileUpload") return (
{t("title")} {t("description")}
onChange("maxFileSize", Number(e.target.value))} />
onChange("allowedTypes", e.target.value)} />
) }