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