update 14 files

front
Reza_ashrafi 3 years ago
parent 655e329c50
commit 8681b95b7e
  1. 1
      public/en.js
  2. 2
      src/App.css
  3. 5
      src/AppRouter.js
  4. 15
      src/views/Auth/Profile/Birthdate/index.js
  5. 2
      src/views/Auth/index.js
  6. 14
      src/views/Cart/Table/index.js
  7. 8
      src/views/Cart/index.scss
  8. 2
      src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js
  9. 6
      src/views/Product/index.js
  10. 8
      src/views/Product/index.scss
  11. 5
      src/views/Products/index.js
  12. 17
      src/views/Products/index.scss

@ -303,6 +303,7 @@ const en = {
تعداد: "Number",
محصول: "the product",
جستجو: "Search",
حذف: "Delete",
ارسال: "submit",
خاموش: "Off",
بیشتر: "More",

@ -7,7 +7,7 @@
direction: ltr;
}
.left: {
.left {
text-align: left !important;
}

@ -288,7 +288,8 @@ class AppRouter extends Component {
)}
</Route>
<Route exact path={"/cart"}>
{status ? (
<Cart />
{/* {status ? (
<Cart />
) : (
<Redirect
@ -296,7 +297,7 @@ class AppRouter extends Component {
pathname: "/",
}}
/>
)}
)} */}
</Route>
<Route exact path={"/checkout"}>
{status ? (

@ -3,13 +3,14 @@ import onInput from "~/util/onInput";
import Input from "../Input/index";
import "./index.scss";
import moment from "jalali-moment";
export default function Birthdate(props) {
const { defaultValue, parent, name } = props;
let momentDate = moment(defaultValue[name]);
let isvalid = momentDate.isValid();
const day = isvalid ? momentDate.format("jDD") : null,
month = isvalid ? momentDate.format("jMM") : null,
year = isvalid ? momentDate.format("jYYYY") : null;
let isvalid = momentDate?.isValid();
const day = isvalid ? momentDate?.format("jDD") : null,
month = isvalid ? momentDate?.format("jMM") : null,
year = isvalid ? momentDate?.format("jYYYY") : null;
const [state, setState] = useState({ day, month, year });
const onChange = (_name, value) => {
let _state = { ...state, [_name]: value };
@ -18,7 +19,11 @@ export default function Birthdate(props) {
parent.onChange(
name,
moment
.from(`${_state.year}/${_state.month}/${_state.day}`, "fa", "YYYY/M/D")
.from(
`${_state?.year}/${_state?.month}/${_state?.day}`,
"fa",
"YYYY/M/D"
)
.locale("en")
);
};

@ -15,7 +15,7 @@ export default class Auth extends Component {
return (
<div className="auth d-flex">
{this.state.page === "login" ? <Login parent={this} /> : null}
{this.state.page === "profile" ? <Profile parent={this} /> : null}
{/* {this.state.page === "profile" ? <Profile parent={this} /> : null} */}
</div>
);
}

@ -197,7 +197,11 @@ const Item = (props) => {
src={`https://dnvn.ir/api/v1/file/${data.product.book.fileIds}`}
alt={data.product.book.name}
/>
<div className="mobile-cart-table-product__info d-flex flex-column p-1">
<div
className={`mobile-cart-table-product__info d-flex flex-column p-1 ${
window.lang === "en" ? "align-items-start" : ""
}`}
>
<strong style={{ fontSize: fontSize.mobile.info.strong }}>
{window.t("نسخه") +
` ${
@ -215,7 +219,13 @@ const Item = (props) => {
window.t("کد فعالسازی محتوای الکترونیک")}
</span>
{route !== "callback" ? (
<div className="mobile-cart-table-product__info--delete d-flex align-items-center align-self-end">
<div
className={`mobile-cart-table-product__info--delete d-flex align-items-center ${
window.lang === "en"
? "align-self-start"
: "align-self-end"
}`}
>
<DeleteOutlineOutlinedIcon
style={{
color: "#FC120A",

@ -64,6 +64,14 @@
}
}
.ltr {
.mobile-cart {
* {
direction: ltr;
}
}
}
.mobile-cart {
width: 100vw;
max-width: 650px;

@ -36,7 +36,7 @@ class NavbarDrawer extends Component {
message: "",
},
{
name: "ورود یا ثبت نام",
name: window.t("ورود یا ثبتنام"),
link: "/auth",
icon: <img src={mobileLogout} alt={window.t("کتابهای من")} />,
toast: "",

@ -224,7 +224,11 @@ class Product extends Component {
<>
<div className="mobile-product d-flex flex-column">
<Navbar />
<header className="mobile-product__header d-flex flex-column align-items-center">
<header
className={
"mobile-product__header d-flex flex-column align-items-center"
}
>
<img
src={`https://dnvn.ir/api/v1/file/${info.fileIds}`}
alt={info.name}

@ -1,3 +1,11 @@
.ltr {
.mobile-product {
* {
direction: ltr;
}
}
}
.mobile-product {
width: 100vw;
max-width: 650px;

@ -103,7 +103,10 @@ class Products extends Component {
<div className="mobile-products__search d-flex">
<input
type="search"
style={{ fontSize: 15 }}
style={{
fontSize: 15,
textAlign: window.lang === "en" ? "left" : "",
}}
placeholder={window.t("جستجو")}
onChange={(e) => this.handleProductSearch(e.target.value)}
/>

@ -1,3 +1,20 @@
.ltr {
.mobile-products {
* {
direction: ltr;
}
&__search {
input {
padding: 5px 35px 5px 5px;
}
img {
left: auto;
right: 10px;
}
}
}
}
.products {
width: 100vw;
max-width: 1250px;

Loading…
Cancel
Save