This commit is contained in:
parent
1f79e3275f
commit
2a52a7ed96
|
@ -11,13 +11,8 @@ import { env } from "@web/src/env";
|
||||||
const { Title, Text, Paragraph } = Typography;
|
const { Title, Text, Paragraph } = Typography;
|
||||||
|
|
||||||
const AuthPage: React.FC = () => {
|
const AuthPage: React.FC = () => {
|
||||||
const {
|
const { showLogin, isLoading, toggleForm, handleLogin, handleRegister } =
|
||||||
showLogin,
|
useAuthForm();
|
||||||
isLoading,
|
|
||||||
toggleForm,
|
|
||||||
handleLogin,
|
|
||||||
handleRegister
|
|
||||||
} = useAuthForm();
|
|
||||||
const { isAuthenticated } = useAuth();
|
const { isAuthenticated } = useAuth();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
@ -35,24 +30,21 @@ const AuthPage: React.FC = () => {
|
||||||
<motion.div
|
<motion.div
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
animate={{ opacity: 1, y: 0 }}
|
animate={{ opacity: 1, y: 0 }}
|
||||||
transition={{ duration: 0.5 }}
|
transition={{ duration: 0.5 }}>
|
||||||
>
|
<div className="w-full max-w-5xl shadow-elegant border-2 border-white rounded-xl overflow-hidden transition-all duration-300 relative">
|
||||||
<div
|
|
||||||
className="w-full max-w-5xl shadow-elegant border-2 border-white rounded-xl overflow-hidden transition-all duration-300 relative"
|
|
||||||
>
|
|
||||||
<div className="flex flex-col md:flex-row min-h-[650px]">
|
<div className="flex flex-col md:flex-row min-h-[650px]">
|
||||||
{/* Left Panel - Welcome Section */}
|
{/* Left Panel - Welcome Section */}
|
||||||
<div className="w-full md:w-1/2 p-12 bg-gradient-to-br from-primary to-primary-600 text-white flex flex-col justify-center relative overflow-hidden">
|
<div className="w-full md:w-1/2 p-12 bg-gradient-to-br from-primary to-primary-600 text-white flex flex-col justify-center relative overflow-hidden">
|
||||||
<motion.div
|
<motion.div
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
animate={{ opacity: 1, y: 0 }}
|
animate={{ opacity: 1, y: 0 }}
|
||||||
transition={{ delay: 0.2, duration: 0.5 }}
|
transition={{ delay: 0.2, duration: 0.5 }}>
|
||||||
>
|
|
||||||
<div className="text-4xl text-white mb-4 font-serif">
|
<div className="text-4xl text-white mb-4 font-serif">
|
||||||
{env.APP_NAME || '信箱'}
|
{env.APP_NAME || "信箱"}
|
||||||
</div>
|
</div>
|
||||||
<Paragraph className="text-lg mb-8 text-blue-100 leading-relaxed text-justify">
|
<Paragraph className="text-lg mb-8 text-blue-100 leading-relaxed text-justify">
|
||||||
聆音于微,润心以答,纾难化雨,解忧惟勤
|
聆音于微 润心以答 <br></br>
|
||||||
|
纾难化雨 解忧惟勤
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
{showLogin && (
|
{showLogin && (
|
||||||
<Button
|
<Button
|
||||||
|
@ -60,8 +52,7 @@ const AuthPage: React.FC = () => {
|
||||||
ghost
|
ghost
|
||||||
size="large"
|
size="large"
|
||||||
onClick={toggleForm}
|
onClick={toggleForm}
|
||||||
className="w-fit hover:bg-white hover:text-blue-700 transition-all"
|
className="w-fit hover:bg-white hover:text-blue-700 transition-all">
|
||||||
>
|
|
||||||
注册账号
|
注册账号
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
@ -70,7 +61,6 @@ const AuthPage: React.FC = () => {
|
||||||
|
|
||||||
{/* Right Panel - Form Section */}
|
{/* Right Panel - Form Section */}
|
||||||
<div className="w-full md:w-1/2 p-10 lg:p-16 bg-white relative rounded-xl">
|
<div className="w-full md:w-1/2 p-10 lg:p-16 bg-white relative rounded-xl">
|
||||||
|
|
||||||
<AnimatePresence mode="wait">
|
<AnimatePresence mode="wait">
|
||||||
{showLogin ? (
|
{showLogin ? (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
@ -78,17 +68,17 @@ const AuthPage: React.FC = () => {
|
||||||
initial={{ opacity: 0, x: 50 }}
|
initial={{ opacity: 0, x: 50 }}
|
||||||
animate={{ opacity: 1, x: 0 }}
|
animate={{ opacity: 1, x: 0 }}
|
||||||
exit={{ opacity: 0, x: -50 }}
|
exit={{ opacity: 0, x: -50 }}
|
||||||
transition={{ duration: 0.3 }}
|
transition={{ duration: 0.3 }}>
|
||||||
>
|
|
||||||
<motion.div className="mb-8">
|
<motion.div className="mb-8">
|
||||||
<Title level={3} className="mb-2">登录</Title>
|
<Title level={3} className="mb-2">
|
||||||
|
登录
|
||||||
|
</Title>
|
||||||
<Text type="secondary">
|
<Text type="secondary">
|
||||||
首次使用?{' '}
|
首次使用?{" "}
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={toggleForm}
|
onClick={toggleForm}
|
||||||
className="p-0 font-medium"
|
className="p-0 font-medium">
|
||||||
>
|
|
||||||
注册账号
|
注册账号
|
||||||
</Button>
|
</Button>
|
||||||
</Text>
|
</Text>
|
||||||
|
@ -97,7 +87,6 @@ const AuthPage: React.FC = () => {
|
||||||
onSubmit={handleLogin}
|
onSubmit={handleLogin}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</motion.div>
|
</motion.div>
|
||||||
) : (
|
) : (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
@ -105,17 +94,17 @@ const AuthPage: React.FC = () => {
|
||||||
initial={{ opacity: 0, x: 50 }}
|
initial={{ opacity: 0, x: 50 }}
|
||||||
animate={{ opacity: 1, x: 0 }}
|
animate={{ opacity: 1, x: 0 }}
|
||||||
exit={{ opacity: 0, x: -50 }}
|
exit={{ opacity: 0, x: -50 }}
|
||||||
transition={{ duration: 0.3 }}
|
transition={{ duration: 0.3 }}>
|
||||||
>
|
|
||||||
<motion.div className="mb-8">
|
<motion.div className="mb-8">
|
||||||
<Title level={3} className="mb-2">注册账号</Title>
|
<Title level={3} className="mb-2">
|
||||||
|
注册账号
|
||||||
|
</Title>
|
||||||
<Text type="secondary">
|
<Text type="secondary">
|
||||||
已有账号?{' '}
|
已有账号?{" "}
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={toggleForm}
|
onClick={toggleForm}
|
||||||
className="p-0 font-medium"
|
className="p-0 font-medium">
|
||||||
>
|
|
||||||
登录平台
|
登录平台
|
||||||
</Button>
|
</Button>
|
||||||
</Text>
|
</Text>
|
||||||
|
@ -124,7 +113,6 @@ const AuthPage: React.FC = () => {
|
||||||
onSubmit={handleRegister}
|
onSubmit={handleRegister}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</motion.div>
|
</motion.div>
|
||||||
)}
|
)}
|
||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
|
@ -133,7 +121,6 @@ const AuthPage: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ export function Footer() {
|
||||||
{/* 开发组织信息 */}
|
{/* 开发组织信息 */}
|
||||||
<div className="text-center md:text-left space-y-2">
|
<div className="text-center md:text-left space-y-2">
|
||||||
<h3 className="text-white font-semibold text-sm flex items-center justify-center md:justify-start">
|
<h3 className="text-white font-semibold text-sm flex items-center justify-center md:justify-start">
|
||||||
创新高地 软件小组
|
软件与数据小组
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-white text-xs italic">
|
<p className="text-white text-xs italic">
|
||||||
提供技术支持
|
提供技术支持
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
module.exports = async ({ page, context }) => {
|
|
||||||
await page.setViewport({ width: 1920, height: 1080 });
|
|
||||||
await page.goto("http://192.168.139.239:8090", {
|
|
||||||
waitUntil: "networkidle0",
|
|
||||||
});
|
|
||||||
await page.evaluate(() => {
|
|
||||||
document.documentElement.requestFullscreen();
|
|
||||||
});
|
|
||||||
};
|
|
Loading…
Reference in New Issue