Skip to content

Commit

Permalink
chore: user signup page update
Browse files Browse the repository at this point in the history
  • Loading branch information
sobird committed Nov 22, 2024
1 parent 4490345 commit 4ecbdca
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/(authentication)/layout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
margin-top: 100px;
}
:global .account-container {
padding: 20px 40px;
padding: 20px 30px;
background-color: #fff;
box-shadow: 0 4px 6px rgba(0,0,0,.1), 0 12px 20px rgba(38,38,38,.12);
border-radius: 8px;
Expand Down
2 changes: 1 addition & 1 deletion app/(authentication)/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import { Divider, Typography } from 'antd';
import { Metadata } from 'next';
import Link from 'next/link';
import { getProviders } from 'next-auth/react';

import Providers from '@/components/providers';

Expand All @@ -36,6 +35,7 @@ const SigninPage: AppPage<{}, SearchParams> = async ({ searchParams }) => {
还没有账号?
<Link href="/signup">立即注册</Link>
</Typography>

<Divider plain>其他登录方式</Divider>

<Providers callbackUrl={callbackUrl} />
Expand Down
2 changes: 1 addition & 1 deletion app/(authentication)/signup/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const SignupForm = () => {
<Input placeholder="用户名" />
</Form.Item>
<Form.Item name="password" rules={[passwordRule]}>
<Input.Password placeholder="登录密码" />
<Input.Password placeholder="登录密码,最少8位字母/数字/符号组合" />
</Form.Item>
<Form.Item name="confirmPassword" dependencies={['password']} rules={[passwordRule]}>
<Input.Password placeholder="密码确认" />
Expand Down
3 changes: 3 additions & 0 deletions app/(authentication)/signup/index.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.container {
padding-top: 30px !important;
}
1 change: 0 additions & 1 deletion app/(authentication)/signup/page.module.scss

This file was deleted.

28 changes: 24 additions & 4 deletions app/(authentication)/signup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
import { Divider, Typography } from 'antd';
import classNames from 'classnames';
import Link from 'next/link';

import Providers from '@/components/providers';

import { SignupForm } from './form';
import styles from './index.module.scss';

export default async function RegisterPage({ searchParams }) {
const { callbackUrl } = await searchParams;

export default function RegisterPage() {
return (
<div className="auth-form">
<>
<h1>注册</h1>
<SignupForm />
</div>
<div className={classNames('account-container', styles.container)}>
<SignupForm />

<Typography>
已有账号?
<Link href="/signin">立即登录</Link>
</Typography>

<Divider plain>其他登录方式</Divider>

<Providers callbackUrl={callbackUrl} />
</div>
</>
);
}

0 comments on commit 4ecbdca

Please sign in to comment.