import React from 'react'; import { useLogin } from '@/hooks/useLogin'; const KEYFRAMES = ` @keyframes float-slow { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(20px, -30px) scale(1.03); } 50% { transform: translate(-10px, -50px) scale(1.01); } 75% { transform: translate(15px, -20px) scale(1.04); } } @keyframes float-medium { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(-25px, -40px) scale(1.02); } 50% { transform: translate(20px, -60px) scale(0.98); } 75% { transform: translate(-15px, -25px) scale(1.03); } } @keyframes float-fast { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(15px, -20px) scale(1.01); } 50% { transform: translate(-20px, -35px) scale(1.02); } 75% { transform: translate(10px, -15px) scale(0.99); } } `; // Floating shapes: [width, height, top, left, color, opacity, animation, duration] const FLOATING_SHAPES: [number, number, string, string, string, number, string, string][] = [ [340, 280, '8%', '5%', 'linear-gradient(135deg, #e0f2fe 0%, #f3e8ff 100%)', 0.5, 'float-slow', '20s'], [240, 200, '55%', '2%', 'linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%)', 0.4, 'float-medium', '25s'], [180, 160, '70%', '15%', 'linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%)', 0.35, 'float-fast', '18s'], [280, 240, '20%', '18%', 'linear-gradient(135deg, #ede9fe 0%, #e0f2fe 100%)', 0.3, 'float-slow', '22s'], ]; export default function NeonCityView(): JSX.Element { const { username, password, loading, error, setUsername, setPassword, handleLogin } = useLogin(); const isDisabled = !username || !password || loading; return ( <>
{/* Floating soft geometric shapes */} {FLOATING_SHAPES.map(([w, h, top, left, bg, opacity, anim, dur], i) => (
))} {/* Login card */}
{/* Brand area */}
{/* Logo */}
{/* Title */}

OpsxSQL

{/* Subtitle */}

企业级数据库审核与合规管理

{/* Login form */}
{/* Username input */}
setUsername(e.target.value)} placeholder="请输入用户名" autoComplete="username" style={{ width: '100%', height: 46, padding: '0 16px', fontSize: 14, color: '#1a1a2e', background: '#f5f5f5', border: '1.5px solid transparent', borderRadius: 10, outline: 'none', boxSizing: 'border-box', transition: 'border-color 0.25s ease, background 0.25s ease', }} onFocus={(e) => { e.currentTarget.style.borderColor = '#93c5fd'; e.currentTarget.style.background = '#fff'; }} onBlur={(e) => { e.currentTarget.style.borderColor = 'transparent'; e.currentTarget.style.background = '#f5f5f5'; }} />
{/* Password input */}
setPassword(e.target.value)} placeholder="请输入密码" autoComplete="current-password" style={{ width: '100%', height: 46, padding: '0 16px', fontSize: 14, color: '#1a1a2e', background: '#f5f5f5', border: '1.5px solid transparent', borderRadius: 10, outline: 'none', boxSizing: 'border-box', transition: 'border-color 0.25s ease, background 0.25s ease', }} onFocus={(e) => { e.currentTarget.style.borderColor = '#93c5fd'; e.currentTarget.style.background = '#fff'; }} onBlur={(e) => { e.currentTarget.style.borderColor = 'transparent'; e.currentTarget.style.background = '#f5f5f5'; }} />
{/* Error message */} {error && (
{error}
)} {/* Login button */}
{/* Copyright */}

© OpsxSQL · 安全合规的数据库管理

); }