存客宝 React

This commit is contained in:
柳清爽
2025-03-29 16:50:39 +08:00
parent caea0b4b99
commit 7e7c199996
388 changed files with 53282 additions and 2076 deletions

View File

@@ -0,0 +1,101 @@
"use client"
import { Input } from "@/components/ui/input"
import { Button } from "@/components/ui/button"
import { Switch } from "@/components/ui/switch"
import { Plus, Minus } from "lucide-react"
interface BasicSettingsProps {
formData: {
taskName: string
startTime: string
endTime: string
syncCount: number
accountType: string
enabled: boolean
}
onChange: (data: Partial<BasicSettingsProps["formData"]>) => void
onNext: () => void
}
export function BasicSettings({ formData, onChange, onNext }: BasicSettingsProps) {
return (
<div className="space-y-6">
<div>
<div className="text-sm mb-2"></div>
<Input
value={formData.taskName}
onChange={(e) => onChange({ taskName: e.target.value })}
placeholder="请输入任务名称"
/>
</div>
<div>
<div className="text-sm mb-2"></div>
<div className="flex items-center space-x-3">
<Input
type="time"
value={formData.startTime}
onChange={(e) => onChange({ startTime: e.target.value })}
className="w-32"
/>
<span className="text-gray-500"></span>
<Input
type="time"
value={formData.endTime}
onChange={(e) => onChange({ endTime: e.target.value })}
className="w-32"
/>
</div>
</div>
<div>
<div className="text-sm mb-2"></div>
<div className="flex items-center space-x-4">
<Button
variant="outline"
size="icon"
onClick={() => onChange({ syncCount: Math.max(1, formData.syncCount - 1) })}
>
<Minus className="h-4 w-4" />
</Button>
<span className="w-8 text-center">{formData.syncCount}</span>
<Button variant="outline" size="icon" onClick={() => onChange({ syncCount: formData.syncCount + 1 })}>
<Plus className="h-4 w-4" />
</Button>
<span className="text-gray-500"></span>
</div>
</div>
<div>
<div className="text-sm mb-2"></div>
<div className="flex space-x-4">
<Button
variant={formData.accountType === "business" ? "default" : "outline"}
onClick={() => onChange({ accountType: "business" })}
className="flex-1"
>
</Button>
<Button
variant={formData.accountType === "personal" ? "default" : "outline"}
onClick={() => onChange({ accountType: "personal" })}
className="flex-1"
>
</Button>
</div>
</div>
<div className="flex items-center justify-between">
<span className="text-sm"></span>
<Switch checked={formData.enabled} onCheckedChange={(checked) => onChange({ enabled: checked })} />
</div>
<Button onClick={onNext} className="w-full mt-8">
</Button>
</div>
)
}

View File

@@ -0,0 +1,40 @@
"use client"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Search } from "lucide-react"
interface ContentLibrarySelectionProps {
selectedLibraries: string[]
onChange: (libraries: string[]) => void
onComplete: () => void
onPrev: () => void
}
export function ContentLibrarySelection({
selectedLibraries,
onChange,
onComplete,
onPrev,
}: ContentLibrarySelectionProps) {
return (
<div className="space-y-4">
<div className="relative">
<Search className="absolute left-3 top-2.5 h-4 w-4 text-gray-400" />
<Input placeholder="选择内容库" className="pl-9" />
</div>
<div className="min-h-[300px] flex items-center justify-center text-gray-400"></div>
<div className="flex space-x-3 mt-8">
<Button variant="outline" onClick={onPrev} className="flex-1">
</Button>
<Button onClick={onComplete} className="flex-1">
</Button>
</div>
</div>
)
}

View File

@@ -0,0 +1,35 @@
"use client"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Search } from "lucide-react"
interface DeviceSelectionProps {
selectedDevices: string[]
onChange: (devices: string[]) => void
onNext: () => void
onPrev: () => void
}
export function DeviceSelection({ selectedDevices, onChange, onNext, onPrev }: DeviceSelectionProps) {
return (
<div className="space-y-4">
<div className="relative">
<Search className="absolute left-3 top-2.5 h-4 w-4 text-gray-400" />
<Input placeholder="选择设备" className="pl-9" />
</div>
<div className="min-h-[300px] flex items-center justify-center text-gray-400"></div>
<div className="flex space-x-3 mt-8">
<Button variant="outline" onClick={onPrev} className="flex-1">
</Button>
<Button onClick={onNext} className="flex-1">
</Button>
</div>
</div>
)
}