Your Name 4753626e5a feat: 完成代理商/品牌方前端及文档更新
代理商端前端:
- 新增达人管理页面(含任务申诉次数管理)
- 新增消息中心(含申诉次数申请审批)
- 新增 Brief 管理(列表、详情)
- 新增审核中心(脚本审核、视频审核)
- 新增数据报表页面

品牌方端前端:
- 优化首页仪表盘布局
- 新增项目管理(列表、详情、创建)
- 新增代理商管理页面
- 新增审核中心(脚本终审、视频终审)
- 新增系统设置页面

文档更新:
- 申诉次数改为按任务分配(每任务初始1次)
- 更新 PRD、FeatureSummary、User_Role_Interfaces 等文档
- 更新 UI 设计规范和开发计划

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 15:39:23 +08:00

243 lines
9.9 KiB
TypeScript

'use client'
import { useState } from 'react'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card'
import { Button } from '@/components/ui/Button'
import {
Bell,
Shield,
Download,
Key,
User,
Mail,
Smartphone,
Globe,
Moon,
Sun,
Check
} from 'lucide-react'
export default function BrandSettingsPage() {
const [notifications, setNotifications] = useState({
email: true,
push: true,
reviewComplete: true,
newSubmission: true,
riskAlert: true,
})
const [theme, setTheme] = useState<'light' | 'dark' | 'system'>('dark')
const handleSave = () => {
alert('设置已保存')
}
return (
<div className="space-y-6 max-w-4xl">
{/* 页面标题 */}
<div>
<h1 className="text-2xl font-bold text-text-primary"></h1>
<p className="text-sm text-text-secondary mt-1"></p>
</div>
{/* 通知设置 */}
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Bell size={18} className="text-accent-indigo" />
</CardTitle>
</CardHeader>
<CardContent className="space-y-4">
<div className="flex items-center justify-between py-3 border-b border-border-subtle">
<div>
<p className="font-medium text-text-primary"></p>
<p className="text-sm text-text-secondary"></p>
</div>
<label className="relative inline-flex items-center cursor-pointer">
<input
type="checkbox"
checked={notifications.email}
onChange={(e) => setNotifications({ ...notifications, email: e.target.checked })}
className="sr-only peer"
/>
<div className="w-11 h-6 bg-bg-elevated peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-accent-indigo rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-accent-indigo"></div>
</label>
</div>
<div className="flex items-center justify-between py-3 border-b border-border-subtle">
<div>
<p className="font-medium text-text-primary"></p>
<p className="text-sm text-text-secondary"></p>
</div>
<label className="relative inline-flex items-center cursor-pointer">
<input
type="checkbox"
checked={notifications.push}
onChange={(e) => setNotifications({ ...notifications, push: e.target.checked })}
className="sr-only peer"
/>
<div className="w-11 h-6 bg-bg-elevated peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-accent-indigo rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-accent-indigo"></div>
</label>
</div>
<div className="pt-2">
<p className="text-sm font-medium text-text-primary mb-3"></p>
<div className="space-y-3">
<label className="flex items-center gap-3 cursor-pointer">
<input
type="checkbox"
checked={notifications.reviewComplete}
onChange={(e) => setNotifications({ ...notifications, reviewComplete: e.target.checked })}
className="w-4 h-4 accent-accent-indigo"
/>
<span className="text-text-secondary"></span>
</label>
<label className="flex items-center gap-3 cursor-pointer">
<input
type="checkbox"
checked={notifications.newSubmission}
onChange={(e) => setNotifications({ ...notifications, newSubmission: e.target.checked })}
className="w-4 h-4 accent-accent-indigo"
/>
<span className="text-text-secondary"></span>
</label>
<label className="flex items-center gap-3 cursor-pointer">
<input
type="checkbox"
checked={notifications.riskAlert}
onChange={(e) => setNotifications({ ...notifications, riskAlert: e.target.checked })}
className="w-4 h-4 accent-accent-indigo"
/>
<span className="text-text-secondary"></span>
</label>
</div>
</div>
</CardContent>
</Card>
{/* 外观设置 */}
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Globe size={18} className="text-purple-400" />
</CardTitle>
</CardHeader>
<CardContent>
<p className="text-sm text-text-secondary mb-4"></p>
<div className="flex gap-3">
<button
type="button"
onClick={() => setTheme('light')}
className={`flex items-center gap-2 px-4 py-3 rounded-lg border-2 transition-colors ${
theme === 'light' ? 'border-accent-indigo bg-accent-indigo/10' : 'border-border-subtle hover:border-accent-indigo/50'
}`}
>
<Sun size={20} className="text-yellow-400" />
<span className="text-text-primary"></span>
{theme === 'light' && <Check size={16} className="text-accent-indigo ml-2" />}
</button>
<button
type="button"
onClick={() => setTheme('dark')}
className={`flex items-center gap-2 px-4 py-3 rounded-lg border-2 transition-colors ${
theme === 'dark' ? 'border-accent-indigo bg-accent-indigo/10' : 'border-border-subtle hover:border-accent-indigo/50'
}`}
>
<Moon size={20} className="text-accent-indigo" />
<span className="text-text-primary"></span>
{theme === 'dark' && <Check size={16} className="text-accent-indigo ml-2" />}
</button>
<button
type="button"
onClick={() => setTheme('system')}
className={`flex items-center gap-2 px-4 py-3 rounded-lg border-2 transition-colors ${
theme === 'system' ? 'border-accent-indigo bg-accent-indigo/10' : 'border-border-subtle hover:border-accent-indigo/50'
}`}
>
<Globe size={20} className="text-text-secondary" />
<span className="text-text-primary"></span>
{theme === 'system' && <Check size={16} className="text-accent-indigo ml-2" />}
</button>
</div>
</CardContent>
</Card>
{/* 账户安全 */}
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Shield size={18} className="text-accent-green" />
</CardTitle>
</CardHeader>
<CardContent className="space-y-4">
<div className="flex items-center justify-between py-3 border-b border-border-subtle">
<div className="flex items-center gap-3">
<Key size={20} className="text-text-tertiary" />
<div>
<p className="font-medium text-text-primary"></p>
<p className="text-sm text-text-secondary"></p>
</div>
</div>
<Button variant="secondary" size="sm"></Button>
</div>
<div className="flex items-center justify-between py-3 border-b border-border-subtle">
<div className="flex items-center gap-3">
<Smartphone size={20} className="text-text-tertiary" />
<div>
<p className="font-medium text-text-primary"></p>
<p className="text-sm text-text-secondary"></p>
</div>
</div>
<Button variant="secondary" size="sm"></Button>
</div>
<div className="flex items-center justify-between py-3">
<div className="flex items-center gap-3">
<Mail size={20} className="text-text-tertiary" />
<div>
<p className="font-medium text-text-primary"></p>
<p className="text-sm text-text-secondary">brand@example.com</p>
</div>
</div>
<Button variant="secondary" size="sm"></Button>
</div>
</CardContent>
</Card>
{/* 数据导出 */}
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Download size={18} className="text-orange-400" />
</CardTitle>
</CardHeader>
<CardContent className="space-y-4">
<p className="text-sm text-text-secondary"></p>
<div className="flex gap-3">
<Button variant="secondary">
<Download size={16} />
</Button>
<Button variant="secondary">
<Download size={16} />
</Button>
</div>
</CardContent>
</Card>
{/* 保存按钮 */}
<div className="flex justify-end pt-4">
<Button onClick={handleSave}>
</Button>
</div>
</div>
)
}