Skip to content

Commit 46a4890

Browse files
authored
Merge pull request #5 from weypro/master
register2
2 parents 344ab56 + 9ca77cd commit 46a4890

File tree

5 files changed

+58
-62
lines changed

5 files changed

+58
-62
lines changed

src/page/login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function Login() {
100100
<Tab label="密码登录" />
101101
<Tab label="短信验证码登录" />
102102
</Tabs>
103-
<div className="tab-view">
103+
<div className="space-justify-view">
104104
<SwipeableViews
105105
axis={theme.direction === "rtl" ? "x-reverse" : "x"}
106106
index={tabs}

src/page/register.js

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -83,37 +83,7 @@ function Register() {
8383
<Container maxWidth={clientWidth <= 600 ? false : "xs"} className={clientWidth <= 600 ? "" : "container"}>
8484
<div>
8585
<FlexCard size={clientWidth <= 600 ? "small" : "large"}>
86-
<Collapse in={page === 2} >
87-
<CardContent className={page === 2 ? "validation-card" : "validation-card-none"}>
88-
<div className="register-tip">
89-
<img className="logo" src={Logo} alt="Logo" />
90-
<Typography className="register-tip-text" variant="h1">
91-
验证您的账号
92-
</Typography>
93-
<p className="project-tip-text">一个账号,畅享BlueAirLive所有服务</p>
94-
<Tabs
95-
value={tabs}
96-
onChange={handleChangeTab}
97-
indicatorColor="primary"
98-
textColor="primary"
99-
variant="fullWidth"
100-
>
101-
<Tab label="使用手机注册" />
102-
<Tab label="使用邮箱注册" />
103-
</Tabs>
104-
<SwipeableViews
105-
axis={theme.direction === "rtl" ? "x-reverse" : "x"}
106-
index={tabs}
107-
onChangeIndex={handleChangeIndex}
108-
>
109-
<TabPanel value={tabs} index={0} dir={theme.direction}>
110-
<TextField className="input" label="手机号码" />
111-
</TabPanel>
112-
<TabPanel value={tabs} index={1} dir={theme.direction}></TabPanel>
113-
</SwipeableViews>
114-
</div>
115-
</CardContent>
116-
</Collapse>
86+
11787
<Collapse in={page === 1}>
11888
<CardContent className={page === 1 ? "register-card" : "register-card-none"}>
11989
<div className="register-tip">
@@ -132,7 +102,7 @@ function Register() {
132102
<TextField className="input" label="密码" />
133103
<TextField className="input" label="确认密码" />
134104
<p className="password-tip-text">
135-
使用{Setting.PASSWORD_MINLEN}个~{Setting.PASSWORD_MAXLEN}个字符(字母、数字和符号的组合
105+
使用{Setting.PASSWORD_MINLEN}个~{Setting.PASSWORD_MAXLEN}个字符(必须包含字母和数字
136106
</p>
137107
</div>
138108

@@ -157,7 +127,34 @@ function Register() {
157127
<Link href="/#/login">登录账号</Link>
158128
</Grid>
159129
<Grid item xs={6} className="options-right">
160-
<Button variant="contained" color="primary" onClick={handleNextPage} disableElevation>
130+
<Button variant="contained" color="primary" onClick={handleNextPage} disableElevation>
131+
下一步
132+
</Button>
133+
</Grid>
134+
</Grid>
135+
</CardContent>
136+
</Collapse>
137+
138+
<Collapse in={page === 2} >
139+
<CardContent className={page === 2 ? "validation-card" : "validation-card-none"}>
140+
<div className="register-tip">
141+
<img className="logo" src={Logo} alt="Logo" />
142+
<Typography className="register-tip-text" variant="h1">
143+
验证您的账号
144+
</Typography>
145+
<p className="project-tip-text">一个账号,畅享BlueAirLive所有服务</p>
146+
147+
</div>
148+
<div className="space-justify-view">
149+
<TextField className="input" label="验证码" />
150+
</div>
151+
152+
<Grid container justify="center" alignItems="center">
153+
<Grid item xs={6}>
154+
<Link href="">重新发送</Link>
155+
</Grid>
156+
<Grid item xs={6} className="options-right">
157+
<Button variant="contained" color="primary" onClick={handleNextPage} disableElevation>
161158
下一步
162159
</Button>
163160
</Grid>

src/static/css/logcommon.css

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
.container {
2-
display: flex !important;
3-
height: calc(100vh - 4px);
2+
display : flex !important;
3+
height : calc(100vh - 4px);
44
justify-content: center;
5-
align-items: center;
5+
align-items : center;
66
}
77

88
.logo {
9-
width: 80px;
10-
height: 80px;
11-
text-align: center;
9+
width : 80px;
10+
height : 80px;
11+
text-align : center;
1212
margin-bottom: 0.3em;
1313
}
1414

1515
.register-card,
1616
.validation-card {
17-
width: 100%;
18-
padding: 20px 40px 36px !important;
17+
width : 100% !important;
18+
padding: 2rem 2.5rem 2rem !important;
19+
}
20+
21+
/*调整一下手机版的左右边框*/
22+
@media screen and (max-width: 600px) {
23+
24+
.register-card,
25+
.validation-card {
26+
width : 100%;
27+
padding: 2rem 1rem 2rem !important;
28+
}
1929
}
2030

2131
.register-card-none,
@@ -28,30 +38,30 @@
2838
}
2939

3040
.register-tip-text {
31-
display: block;
32-
font-size: 24px !important;
41+
display : block;
42+
font-size : 24px !important;
3343
font-weight: 400 !important;
3444
line-height: 32px !important;
3545
}
3646

3747
.project-tip-text {
38-
color: rgba(0, 0, 0, 0.45);
48+
color : rgba(0, 0, 0, 0.45);
3949
font-size: 14px;
4050
}
4151

4252
.input {
43-
width: 100%;
53+
width : 100%;
4454
margin-bottom: 0.3em !important;
4555
}
4656

4757
.email-tip-text {
48-
font-size: 12px;
49-
text-align: left;
58+
font-size : 12px;
59+
text-align : left;
5060
margin-bottom: 0.5em;
5161
}
5262

5363
.password-tip-text {
54-
font-size: 12px;
64+
font-size : 12px;
5565
text-align: left;
5666
}
5767

@@ -74,5 +84,5 @@
7484

7585
/*重置focus,不然感觉不好看*/
7686
.MuiButton-containedPrimary:focus {
77-
background-color: #1890FF !important;
87+
background-color: #1890FF !important;
7888
}

src/static/css/login.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.tab-view{
1+
.space-justify-view{
22
margin-top: 0.4em;
33
margin-bottom: 1em;
44
}

src/static/css/register.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11

2-
.register-card,
3-
.validation-card {
4-
width: 100%;
5-
padding: 20px 40px 36px !important;
6-
}
7-
8-
.register-card-none,
9-
.validation-card-none {
10-
display: none;
11-
}
12-
132
.register-tip {
143
text-align: center;
154
}

0 commit comments

Comments
 (0)