子仓库提交

This commit is contained in:
2025-11-10 09:19:56 +08:00
parent 62f92213f7
commit 5feb24e4e2
733 changed files with 141413 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
'use client';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import type { SecuritySettings } from '../types';
interface TwoFactorAuthProps {
securitySettings: SecuritySettings | null;
onUpdate: (updates: Partial<SecuritySettings>) => void;
}
export function TwoFactorAuth({ securitySettings, onUpdate }: TwoFactorAuthProps) {
const handleToggle = () => {
onUpdate({ twoFactorEnabled: !securitySettings?.twoFactorEnabled });
};
return (
<Card>
<CardHeader>
<CardTitle></CardTitle>
</CardHeader>
<CardContent>
<div className="flex items-center justify-between">
<div>
<p className="font-medium">
{securitySettings?.twoFactorEnabled ? '已启用' : '未启用'}
</p>
<p className="text-sm text-gray-600">
</p>
</div>
<Button
variant={securitySettings?.twoFactorEnabled ? "destructive" : "default"}
onClick={handleToggle}
>
{securitySettings?.twoFactorEnabled ? '禁用' : '启用'}
</Button>
</div>
</CardContent>
</Card>
);
}