| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- 'use client';
- import { X, User } from 'lucide-react';
- import { Account } from '@/types';
- interface AccountRegistrationModalProps {
- isOpen: boolean;
- onClose: () => void;
- account: Account | null;
- }
- export default function AccountRegistrationModal({
- isOpen,
- onClose,
- account,
- }: AccountRegistrationModalProps) {
- if (!isOpen || !account) return null;
- return (
- <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4 animate-in fade-in zoom-in-95 duration-200">
- <div className="bg-white rounded-xl shadow-2xl w-full max-w-lg overflow-hidden">
- <div className="px-6 py-4 border-b border-slate-100 flex justify-between items-center bg-blue-50/50">
- <h3 className="font-bold text-lg text-blue-900 flex items-center gap-2">
- <User size={18} /> 注册信息
- </h3>
- <button onClick={onClose} className="text-slate-400 hover:text-slate-600">
- <X size={20} />
- </button>
- </div>
- <div className="p-6 space-y-4">
- <p className="text-sm text-slate-600 bg-blue-50 p-3 rounded-lg border border-blue-100">
- 账号: <span className="font-bold text-slate-900">{account.username}</span>
- </p>
- <div className="bg-slate-50 p-4 rounded-lg border border-slate-200">
- <pre className="text-xs font-mono text-slate-700 whitespace-pre-wrap overflow-x-auto">
- {JSON.stringify(account.extra_data || {}, null, 2)}
- </pre>
- </div>
- </div>
- <div className="px-6 py-4 bg-slate-50 flex justify-end gap-3 border-t">
- <button
- onClick={onClose}
- className="px-4 py-2 text-sm text-slate-600 hover:bg-slate-200 rounded-lg transition"
- >
- 关闭
- </button>
- </div>
- </div>
- </div>
- );
- }
|