|
|
|
@ -2,8 +2,19 @@ import React, { Component } from "react"; |
|
|
|
|
import Timer from "../Timer/index"; |
|
|
|
|
|
|
|
|
|
import logo from "../../../../assets/icons/logo.png"; |
|
|
|
|
import pic from "../../../../assets/images/pic.png"; |
|
|
|
|
|
|
|
|
|
import "./index.scss"; |
|
|
|
|
|
|
|
|
|
const maxDesktopSize = 1250; |
|
|
|
|
|
|
|
|
|
const fontSize = { |
|
|
|
|
desktop: { |
|
|
|
|
input: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 85, |
|
|
|
|
button: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 85, |
|
|
|
|
div: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 95, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
export default class Code extends Component { |
|
|
|
|
constructor(props) { |
|
|
|
|
super(props); |
|
|
|
@ -72,7 +83,14 @@ export default class Code extends Component { |
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
{window.innerWidth > 1000 ? ( |
|
|
|
|
<div className="auth-code d-flex"> |
|
|
|
|
<div className="auth-code d-flex justify-content-center align-items-center"> |
|
|
|
|
<div className="auth-code__box d-flex"> |
|
|
|
|
<div |
|
|
|
|
style={{ width: "48%", height: "100%" }} |
|
|
|
|
className="d-flex flex-column justify-content-center align-items-center" |
|
|
|
|
> |
|
|
|
|
<img src={logo} alt="دانوین" /> |
|
|
|
|
<div className="auth-code__box--codes d-flex"> |
|
|
|
|
<label htmlFor="code1"> |
|
|
|
|
<input |
|
|
|
|
id="code1" |
|
|
|
@ -88,6 +106,7 @@ export default class Code extends Component { |
|
|
|
|
onKeyDown={(e) => this.keyboardEvent(e)} |
|
|
|
|
onInput={this.onInput} |
|
|
|
|
onChange={(e) => this.changeValue(e)} |
|
|
|
|
style={{ fontSize: fontSize.desktop.input }} |
|
|
|
|
/> |
|
|
|
|
</label> |
|
|
|
|
<label htmlFor="code2"> |
|
|
|
@ -105,6 +124,7 @@ export default class Code extends Component { |
|
|
|
|
onKeyDown={(e) => this.keyboardEvent(e)} |
|
|
|
|
onInput={this.onInput} |
|
|
|
|
onChange={(e) => this.changeValue(e)} |
|
|
|
|
style={{ fontSize: fontSize.desktop.input }} |
|
|
|
|
/> |
|
|
|
|
</label> |
|
|
|
|
<label htmlFor="code3"> |
|
|
|
@ -122,10 +142,12 @@ export default class Code extends Component { |
|
|
|
|
onKeyDown={(e) => this.keyboardEvent(e)} |
|
|
|
|
onInput={this.onInput} |
|
|
|
|
onChange={(e) => this.changeValue(e)} |
|
|
|
|
style={{ fontSize: fontSize.desktop.input }} |
|
|
|
|
/> |
|
|
|
|
</label> |
|
|
|
|
<label htmlFor="code4"> |
|
|
|
|
<input |
|
|
|
|
|
|
|
|
|
id="code4" |
|
|
|
|
name="o4" |
|
|
|
|
type="text" |
|
|
|
@ -139,19 +161,48 @@ export default class Code extends Component { |
|
|
|
|
onKeyDown={(e) => this.keyboardEvent(e)} |
|
|
|
|
onInput={this.onInput} |
|
|
|
|
onChange={(e) => this.changeValue(e)} |
|
|
|
|
style={{ fontSize: fontSize.desktop.input }} |
|
|
|
|
/> |
|
|
|
|
</label> |
|
|
|
|
</div> |
|
|
|
|
<button style={{ fontSize: fontSize.desktop.button }}>ثبت</button> |
|
|
|
|
{!this.state.resendStatus ? ( |
|
|
|
|
<Timer seconds={10} parent={this} /> |
|
|
|
|
) : ( |
|
|
|
|
<div |
|
|
|
|
style={{ color: "#88ff88" }} |
|
|
|
|
className="timer d-flex" |
|
|
|
|
style={{ |
|
|
|
|
color: "#A5A5A5", |
|
|
|
|
fontFamily: "numeralMedium", |
|
|
|
|
fontSize: fontSize.desktop.div, |
|
|
|
|
}} |
|
|
|
|
className="timer d-flex mt-4" |
|
|
|
|
onClick={() => this.setState({ resendStatus: false })} |
|
|
|
|
> |
|
|
|
|
دریافت مجدد کد |
|
|
|
|
ارسال مجدد کد فعال سازی |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
<div |
|
|
|
|
style={{ |
|
|
|
|
color: "#A5A5A5", |
|
|
|
|
fontFamily: "numeralMedium", |
|
|
|
|
fontSize: fontSize.desktop.div, |
|
|
|
|
}} |
|
|
|
|
className="timer d-flex mt-2" |
|
|
|
|
onClick={() => |
|
|
|
|
this.props.parent.setState({ page: 0, cellphone: "" }) |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
بازگشت به مرحله قبل و اصلاح شماره |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div style={{ width: "48%", height: "100%" }} className="d-flex"> |
|
|
|
|
<img |
|
|
|
|
src={pic} |
|
|
|
|
alt="عکس" |
|
|
|
|
style={{ width: "100%", height: "100%" }} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
) : null} |
|
|
|
|
{window.innerWidth < 1000 ? ( |
|
|
|
@ -249,7 +300,9 @@ export default class Code extends Component { |
|
|
|
|
<div |
|
|
|
|
style={{ color: "#A5A5A5", fontFamily: "numeralLight" }} |
|
|
|
|
className="timer d-flex mt-2" |
|
|
|
|
onClick={() => this.props.parent.setState({ page : 0, cellphone : ''})} |
|
|
|
|
onClick={() => |
|
|
|
|
this.props.parent.setState({ page: 0, cellphone: "" }) |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
بازگشت به مرحله قبل و اصلاح شماره |
|
|
|
|
</div> |
|
|
|
|