diff --git a/src/views/Auth/Login/Cellphone/index.js b/src/views/Auth/Login/Cellphone/index.js index 2b8f063..3a15f01 100644 --- a/src/views/Auth/Login/Cellphone/index.js +++ b/src/views/Auth/Login/Cellphone/index.js @@ -2,46 +2,88 @@ import React, { Component } from "react"; import logo from "../../../../assets/icons/logo.png"; import iran from "../../../../assets/icons/iran.svg"; +import pic from "../../../../assets/images/pic.png"; import "./index.scss"; + +const maxDesktopSize = 1250; + +const fontSize = { + desktop: { + span: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 85, + input: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 85, + button: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 85, + div: window.innerWidth > maxDesktopSize ? 16 : window.innerWidth / 95, + }, +}; + export default class Cellphone extends Component { - componentDidMount() { - this.inputRef1.focus(); - } render() { return ( <> {window.innerWidth > 1000 ? ( -
- دانوین -
-
- this.props.parent.setState({ - page: 1, - cellphone: "09" + this.state.cellphone, - }) - } - > - { - this.inputRef1 = input; - }} - onChange={(e) => this.setState({ cellphone: e.target.value })} - onInput={(e) => - (e.target.value = e.target.value - .replace(/[\u0660-\u0669\u06f0-\u06f9]/g, function (c) { - return c.charCodeAt(0) & 0xf; +
+
+
+ دانوین + + this.props.parent.setState({ + page: 1, + cellphone: "09" + this.state.cellphone, }) - .replace(/[^\d]/, "")) - } - /> - + } + > + +98 + پرچم + { + this.inputRef1 = input; + }} + onChange={(e) => + this.setState({ cellphone: e.target.value }) + } + onInput={(e) => + (e.target.value = e.target.value + .replace(/[\u0660-\u0669\u06f0-\u06f9]/g, function (c) { + return c.charCodeAt(0) & 0xf; + }) + .replace(/[^\d]/, "")) + } + /> + + +
+
+ {" "} + حساب کاربری ندارید ؟ همین حالا +
+
شرایط استفاده و حریم خصوصی
+
+
+
+ عکس +
+
) : null} {window.innerWidth < 1000 ? ( diff --git a/src/views/Auth/Login/Cellphone/index.scss b/src/views/Auth/Login/Cellphone/index.scss index 9fec438..7eebc51 100644 --- a/src/views/Auth/Login/Cellphone/index.scss +++ b/src/views/Auth/Login/Cellphone/index.scss @@ -1,21 +1,75 @@ .auth-cellphone { - width: 100%; - height: 100%; - justify-content: center; - align-items: center; - label { - text-align: right; - display: flex; - flex-direction: column; - color: white; - input { - background-color: inherit; - border: 0px; - border-bottom: 2px solid white; - font-size: 24px; - color: white; - direction: ltr; - text-align: center; + width: 100vw; + height: 100vh; + &__box { + width: 100%; + max-width: 1000px; + border: 1px solid #ddd; + border-radius: 20px; + justify-content: space-between; + height: 80%; + img { + margin-bottom: 30px; + width: 200px; + } + form { + width: 100%; + max-width: 400px; + position: relative; + img { + position: absolute; + left: 10px; + top: 6px; + width: 45px; + } + span { + text-align: right; + position: absolute; + left: 65px; + top: 8px; + direction: ltr; + color: #a5a5a5; + } + input { + width: 100%; + max-width: 400px; + background-color: inherit; + color: #a5a5a5; + direction: ltr; + text-align: left; + background-color: #f2f2f2; + border: none; + padding: 8px 5px 8px 105px; + border-radius: 5px; + &:focus { + outline: 0px; + } + } + button { + margin-top: 20px; + width: 100%; + max-width: 400px; + border: 0px; + font-family: numeralMedium; + background-color: #6cbe44; + color: white; + border-radius: 7px; + padding: 8px; + } + } + &--footer { + max-width: 400px; + div { + font-family: numeralMedium; + color: #a5a5a5; + letter-spacing: -1px; + button { + background-color: white; + border: 0px; + color: #02733c; + letter-spacing: -1px; + } + } } } } @@ -51,13 +105,13 @@ width: 100%; position: relative; bottom: 40px; - img{ + img { position: absolute; left: 10px; top: 6px; width: 45px; } - span{ + span { text-align: right; position: absolute; left: 65px; @@ -81,30 +135,30 @@ outline: 0px; } } - button{ + button { margin-top: 20px; width: 100%; border: 0px; font-family: numeralMedium; - background-color: #6CBE44; + background-color: #6cbe44; color: white; border-radius: 7px; padding: 8px; font-size: calc(100vw / 20); } } - &__footer{ + &__footer { position: fixed; bottom: 40px; - div{ + div { font-family: numeralMedium; font-size: calc(100vw / 28); color: #a5a5a5; letter-spacing: -1px; - button{ + button { background-color: white; border: 0px; - color: #02733C; + color: #02733c; } } } diff --git a/src/views/Auth/Login/Code/index.js b/src/views/Auth/Login/Code/index.js index 6e487a4..e204cf2 100644 --- a/src/views/Auth/Login/Code/index.js +++ b/src/views/Auth/Login/Code/index.js @@ -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,86 +83,126 @@ export default class Code extends Component { return ( <> {window.innerWidth > 1000 ? ( -
- - - - - {!this.state.resendStatus ? ( - - ) : ( +
+
this.setState({ resendStatus: false })} + style={{ width: "48%", height: "100%" }} + className="d-flex flex-column justify-content-center align-items-center" > - دریافت مجدد کد + دانوین +
+ + + + +
+ + {!this.state.resendStatus ? ( + + ) : ( +
this.setState({ resendStatus: false })} + > + ارسال مجدد کد فعال سازی +
+ )} +
+ this.props.parent.setState({ page: 0, cellphone: "" }) + } + > + بازگشت به مرحله قبل و اصلاح شماره +
- )} +
+ عکس +
+
) : null} {window.innerWidth < 1000 ? ( @@ -249,7 +300,9 @@ export default class Code extends Component {
this.props.parent.setState({ page : 0, cellphone : ''})} + onClick={() => + this.props.parent.setState({ page: 0, cellphone: "" }) + } > بازگشت به مرحله قبل و اصلاح شماره
diff --git a/src/views/Auth/Login/Code/index.scss b/src/views/Auth/Login/Code/index.scss index 23d6f2a..3c0f243 100644 --- a/src/views/Auth/Login/Code/index.scss +++ b/src/views/Auth/Login/Code/index.scss @@ -1,84 +1,110 @@ .auth-code{ - width: 100%; - height: 100%; - justify-content:center; - align-items:center; - direction: ltr; - position: relative; - input { - width: 50px; - background-color: inherit; - border : 0px; - border-bottom: 2px solid white; - margin : 0px 7px; - font-size: 24px; - color : white; - text-align: center; - direction : ltr; - &:focus{ - outline: 0px; + width: 100vw; + height: 100vh; + &__box { + width: 100%; + max-width: 1000px; + border: 1px solid #ddd; + border-radius: 20px; + justify-content: space-between; + height: 80%; + img { + margin-bottom: 30px; + } + button{ + margin-top: 20px; + width: 100%; + max-width: 300px; + border: 0px; + font-family: numeralMedium; + background-color: #6CBE44; + color: white; + border-radius: 7px; + padding: 8px; + } + &--codes{ + direction: ltr; + input { + max-width: 60px; + max-height: 60px; + background-color: #f2f2f2; + border : 0px; + margin : 0px 10px; + color: #6F7074; + text-align: center; + direction : ltr; + border-radius: 5px; + padding: 10px 15px; + &:focus{ + outline: 0px; + } + } + div{ + letter-spacing:-1px; + } } } -} - -.mobile-auth-code{ - width: 100%; - height: 100%; - justify-content:center; - align-items:center; - direction: ltr; - position: relative; - max-width: 360px; - margin: 0px auto; - img { - margin-bottom: 30px; - position: relative; - bottom: 40px; - } - h1 { - font-family: numeralBold; - font-size: calc(100vw / 15); - color: #6f7074; - position: relative; - bottom: 40px; - } - p { - font-family: numeralLight; - font-size: calc(100vw / 25); - color: #6f7074; - letter-spacing: -1px; - position: relative; - bottom: 40px; - } - button{ - margin-top: 20px; + + .mobile-auth-code{ width: 100%; - max-width: 300px; - border: 0px; - font-family: numeralMedium; - background-color: #6CBE44; - color: white; - border-radius: 7px; - padding: 8px; - font-size: calc(100vw / 20); - } - &__codes{ + height: 100%; + justify-content:center; + align-items:center; direction: ltr; - input { - max-width: 60px; - max-height: 60px; - background-color: #f2f2f2; - border : 0px; - margin : 0px 10px; - color: #6F7074; - text-align: center; - direction : ltr; + position: relative; + max-width: 360px; + margin: 0px auto; + img { + margin-bottom: 30px; + position: relative; + bottom: 40px; + } + h1 { + font-family: numeralBold; font-size: calc(100vw / 15); - border-radius: 5px; - padding: 10px 15px; - &:focus{ - outline: 0px; + color: #6f7074; + position: relative; + bottom: 40px; + } + p { + font-family: numeralLight; + font-size: calc(100vw / 25); + color: #6f7074; + letter-spacing: -1px; + position: relative; + bottom: 40px; + } + button{ + margin-top: 20px; + width: 100%; + max-width: 300px; + border: 0px; + font-family: numeralMedium; + background-color: #6CBE44; + color: white; + border-radius: 7px; + padding: 8px; + font-size: calc(100vw / 20); + } + &__codes{ + direction: ltr; + input { + max-width: 60px; + max-height: 60px; + background-color: #f2f2f2; + border : 0px; + margin : 0px 10px; + color: #6F7074; + text-align: center; + direction : ltr; + font-size: calc(100vw / 15); + border-radius: 5px; + padding: 10px 15px; + &:focus{ + outline: 0px; + } } } } + } \ No newline at end of file diff --git a/src/views/Auth/Login/Timer/index.js b/src/views/Auth/Login/Timer/index.js index 2687754..b3befab 100644 --- a/src/views/Auth/Login/Timer/index.js +++ b/src/views/Auth/Login/Timer/index.js @@ -1,6 +1,13 @@ import { Component } from "react"; import "./index.css"; +const maxDesktopSize = 1250; + +const fontSize = { + desktop: { + div: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 95, + }, +}; export default class Timer extends Component { constructor(props) { super(props); @@ -56,11 +63,26 @@ export default class Timer extends Component { } render() { return ( -
-
زمان باقیمانده تا انقضای کد:
-
{this.state.time.s}
: -
{this.state.time.m + this.state.time.h * 60}
-
+ <> + {window.innerWidth > 1000 ? ( +
+
+ زمان باقیمانده تا انقضای کد: +
+
{this.state.time.s}
: +
{this.state.time.m + this.state.time.h * 60}
+
+ ) : null} + {window.innerWidth < 1000 ? ( +
+
+ زمان باقیمانده تا انقضای کد: +
+
{this.state.time.s}
: +
{this.state.time.m + this.state.time.h * 60}
+
+ ) : null} + ); } } diff --git a/src/views/Auth/Login/index.js b/src/views/Auth/Login/index.js index 0c5e20f..d27f4c6 100644 --- a/src/views/Auth/Login/index.js +++ b/src/views/Auth/Login/index.js @@ -7,7 +7,7 @@ export default class Login extends Component { constructor(props) { super(props); this.state = { - page: 1, + page: 0, }; } diff --git a/src/views/Auth/Profile/Select/index.js b/src/views/Auth/Profile/Select/index.js index ecf9703..376b94d 100644 --- a/src/views/Auth/Profile/Select/index.js +++ b/src/views/Auth/Profile/Select/index.js @@ -43,7 +43,7 @@ export default function CustomizedSelects(props) { console.log(props); return ( -
+
{props.label} +
+
+ +
+
+ +
+
+
+
+ +
+
+