mosaicmap/app/me/security/page.tsx
2025-07-28 23:14:43 +08:00

126 lines
5.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client"
import { useState } from "react"
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Label } from "@/components/ui/label"
import { Switch } from "@/components/ui/switch"
import { Badge } from "@/components/ui/badge"
import { Separator } from "@/components/ui/separator"
import { Save } from "lucide-react"
export default function Page() {
const [security, setSecurity] = useState({
twoFactor: true,
loginAlerts: true,
dataExport: false,
})
return (
<div className="space-y-6">
<div>
<h2 className="text-2xl font-bold tracking-tight"></h2>
<p className="text-muted-foreground"></p>
</div>
<Card>
<CardHeader>
<CardTitle></CardTitle>
<CardDescription></CardDescription>
</CardHeader>
<CardContent className="space-y-6">
<div className="space-y-4">
<div className="flex items-center justify-between">
<div className="space-y-1">
<Label></Label>
<p className="text-sm text-muted-foreground"></p>
</div>
<div className="flex items-center gap-2">
<Badge variant={security.twoFactor ? "default" : "secondary"}>
{security.twoFactor ? "已启用" : "未启用"}
</Badge>
<Switch
checked={security.twoFactor}
onCheckedChange={(checked) => setSecurity({ ...security, twoFactor: checked })}
/>
</div>
</div>
<Separator />
<div className="flex items-center justify-between">
<div className="space-y-1">
<Label></Label>
<p className="text-sm text-muted-foreground"></p>
</div>
<Switch
checked={security.loginAlerts}
onCheckedChange={(checked) => setSecurity({ ...security, loginAlerts: checked })}
/>
</div>
<Separator />
<div className="flex items-center justify-between">
<div className="space-y-1">
<Label></Label>
<p className="text-sm text-muted-foreground"></p>
</div>
<Switch
checked={security.dataExport}
onCheckedChange={(checked) => setSecurity({ ...security, dataExport: checked })}
/>
</div>
</div>
<div className="space-y-4 pt-4 border-t">
<h4 className="font-medium"></h4>
<div className="space-y-3">
<div className="flex items-center justify-between p-3 border rounded-lg">
<div className="space-y-1">
<p className="font-medium"></p>
<p className="text-sm text-muted-foreground">Chrome on Windows </p>
</div>
<Badge variant="outline"></Badge>
</div>
<div className="flex items-center justify-between p-3 border rounded-lg">
<div className="space-y-1">
<p className="font-medium">iPhone</p>
<p className="text-sm text-muted-foreground">Safari on iOS 2</p>
</div>
<Button variant="outline" size="sm">
</Button>
</div>
</div>
</div>
<Button className="gap-2">
<Save className="h-4 w-4" />
</Button>
</CardContent>
</Card>
<Card className="border-destructive/50">
<CardHeader>
<CardTitle className="text-destructive"></CardTitle>
<CardDescription></CardDescription>
</CardHeader>
<CardContent className="space-y-4">
<div className="flex items-center justify-between">
<div className="space-y-1">
<Label></Label>
<p className="text-sm text-muted-foreground"></p>
</div>
<Button variant="destructive" size="sm">
</Button>
</div>
</CardContent>
</Card>
</div>
)
}