"use client" import { Card, CardContent } from "@/components/ui/card" import { Button } from "@/components/ui/button" import { Label } from "@/components/ui/label" import { Checkbox } from "@/components/ui/checkbox" import { Switch } from "@/components/ui/switch" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { HelpCircle, FileText, ImageIcon, Video, LinkIcon, FileAudio } from "lucide-react" import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" import type { ContentLibraryFormData } from "../page" interface ContentSettingsProps { formData: ContentLibraryFormData updateFormData: (field: string, value: any) => void onNext: () => void onPrevious: () => void } export function ContentSettings({ formData, updateFormData, onNext, onPrevious }: ContentSettingsProps) { const contentTypes = [ { id: "text", name: "文本", icon: FileText, description: "收集文本内容,如聊天记录、文章等" }, { id: "image", name: "图片", icon: ImageIcon, description: "收集图片内容,如照片、截图等" }, { id: "video", name: "视频", icon: Video, description: "收集视频内容,如短视频、直播回放等" }, { id: "link", name: "链接", icon: LinkIcon, description: "收集链接内容,如网页链接、小程序链接等" }, { id: "audio", name: "音频", icon: FileAudio, description: "收集音频内容,如语音消息、音乐等" }, ] const handleContentTypeToggle = (type: string) => { const currentTypes = [...formData.contentTypes] if (currentTypes.includes(type)) { updateFormData( "contentTypes", currentTypes.filter((t) => t !== type), ) } else { updateFormData("contentTypes", [...currentTypes, type]) } } const handleAutoSyncChange = (checked: boolean) => { updateFormData("autoSync", checked) } const handleSyncIntervalChange = (value: string) => { updateFormData("syncInterval", Number.parseInt(value)) } const isFormValid = formData.contentTypes.length > 0 return (
设置需要收集的内容类型和同步方式
选择需要收集的内容类型,可以多选。不同类型的内容将分别存储和管理。
{type.description}
请至少选择一种内容类型
)}启用后,系统将按照设定的时间间隔自动同步内容