From 73f4f7ad3d983a70419b334094c9fbc6c9b83ce5 Mon Sep 17 00:00:00 2001 From: amir hosein gorji Date: Thu, 9 Sep 2021 20:57:59 +0430 Subject: [PATCH] 18-6 --- public/offline.html | 141 +++++++++--------- src/App.css | 2 +- src/Redux/actions/userProduct.js | 5 + src/Redux/reducers/userProduct.js | 3 + src/views/AR/Item/index.js | 24 ++- src/views/AR/index.js | 101 ++++++++----- src/views/About/index.scss | 12 +- src/views/Activation/index.scss | 8 +- src/views/Auth/Login/Cellphone/index.scss | 2 +- src/views/Auth/Login/Code/index.scss | 2 +- src/views/Auth/Profile/index.scss | 4 +- src/views/Cart/DeliveryMethod/index.scss | 2 +- src/views/Cart/Discount/index.scss | 23 ++- src/views/Cart/Factor/index.scss | 26 ++-- src/views/Cart/index.scss | 4 +- src/views/ChatList/index.scss | 4 +- .../ChatRoom/Body/Message/Inline/index.scss | 2 +- src/views/ChatRoom/Body/index.scss | 68 ++++----- src/views/ChatRoom/Info/index.scss | 57 ++++--- src/views/Contact/index.js | 4 +- src/views/Contact/index.scss | 4 +- src/views/Faq/index.scss | 4 +- src/views/Home/Footer/index.js | 44 +++--- src/views/Home/Footer/index.scss | 10 +- .../Home/HomeScroll/MyProduct/index.scss | 42 +++--- src/views/Home/HomeScroll/Product/index.scss | 42 +++--- src/views/Home/HomeScroll/index.scss | 4 +- src/views/Home/HomeSearch/index.js | 2 +- src/views/Home/HomeSlider/Blog/index.scss | 4 +- src/views/Home/HomeSlider/Header/index.js | 4 +- src/views/Home/HomeSlider/Header/index.scss | 8 +- src/views/Home/HomeSlider/Simple/index.scss | 46 +++--- src/views/Home/HomeSlider/index.scss | 4 +- src/views/Home/HomeStatic/index.scss | 10 +- src/views/Home/Membership/index.js | 4 +- src/views/Home/Membership/index.scss | 4 +- src/views/Home/Navbar/Laptop/index.js | 2 +- src/views/Home/Navbar/Mobile/index.scss | 2 +- src/views/Home/SingleBlog/index.scss | 2 +- src/views/Home/index.scss | 2 +- src/views/Product/AddToCart/index.scss | 2 +- src/views/Product/Gallery/index.scss | 10 +- src/views/Product/Info/index.scss | 19 +-- src/views/Product/index.scss | 12 +- .../Filters/AppliedFilters/index.scss | 4 +- .../Filters/TypicalFilters/index.scss | 21 ++- src/views/Products/Product/index.scss | 2 +- src/views/QR/BookContent/index.scss | 2 +- src/views/QR/SubjectsDropdown/index.scss | 16 +- src/views/QR/VoiceBox/index.scss | 54 +++---- src/views/QR/index.scss | 14 +- src/views/QRScan/index.scss | 6 +- 52 files changed, 470 insertions(+), 430 deletions(-) diff --git a/public/offline.html b/public/offline.html index c09fcf0..f98127f 100644 --- a/public/offline.html +++ b/public/offline.html @@ -1,86 +1,83 @@ - - - - - دعوت - - + hsla(100, 100%, 60%, 1) 100%); + } + + .splash span { + font-family: numeralLight; + margin-top: 20px; + color: #02733c; + font-size: 20px; + letter-spacing: -1px; + } + + + + +
+ لوگو + دسترسی شما به اینترنت قطع می‌باشد. +
+ - -
- لوگو - دسترسی شما به اینترنت قطع می‌باشد. -
- - + \ No newline at end of file diff --git a/src/App.css b/src/App.css index 534a887..c8773a4 100644 --- a/src/App.css +++ b/src/App.css @@ -15,7 +15,7 @@ } @font-face { - font-family: numeralBold; + font-family: numeralMedium; src: url(assets/IRANSans/IRANSans_Bold.ttf); } diff --git a/src/Redux/actions/userProduct.js b/src/Redux/actions/userProduct.js index 2436d7f..efc6fef 100644 --- a/src/Redux/actions/userProduct.js +++ b/src/Redux/actions/userProduct.js @@ -5,6 +5,11 @@ const userProduct = { async (dispatch) => { await proxy.get("userProduct/list", data, { dispatch }); }, + myList: + (data = {}) => + async (dispatch) => { + await proxy.get("userProduct/myList", data, { dispatch }); + }, info: (data = {}) => async (dispatch) => diff --git a/src/Redux/reducers/userProduct.js b/src/Redux/reducers/userProduct.js index 24a67bf..473b1e6 100644 --- a/src/Redux/reducers/userProduct.js +++ b/src/Redux/reducers/userProduct.js @@ -8,6 +8,7 @@ const initialState = { sum: null, checkEmpty: false, hasPhysical: false, + myList: [], }; export default function userProduct(state = initialState, action) { let { type, data, message } = action; @@ -30,6 +31,8 @@ export default function userProduct(state = initialState, action) { }; case "userProduct/info": return { ...state, loading: false, info: data, error: null }; + case "userProduct/myList": + return { ...state, loading: false, myList: data, error: null }; case "userProduct/update": return { ...state, loading: false, error: null }; case "userProduct/add": diff --git a/src/views/AR/Item/index.js b/src/views/AR/Item/index.js index f36bf1d..9216698 100644 --- a/src/views/AR/Item/index.js +++ b/src/views/AR/Item/index.js @@ -15,10 +15,25 @@ const fontSize = { old: window.innerWidth > maxDesktopSize ? 9 : window.innerWidth / 120, }, }; - +const grades = [ + "پیش دبستان", + "اول", + "دوم", + "سوم", + "چهارم", + "پنجم", + "ششم", + "هفتم", + "هشتم", + "نهم", + "دهم", + "یازدهم", + "دوازدهم", +]; export default class Item extends Component { render() { const { data } = this.props; + console.log({ data }); return ( <> {window.innerWidth < 1000 ? ( @@ -28,11 +43,14 @@ export default class Item extends Component { className="mobile-products-product d-flex flex-column" > {data.title}
-

{data.title}

+

+ {data["product.book.name"]}{" "} + {grades[+data["product.book.gradeId"]]} +

) : null} diff --git a/src/views/AR/index.js b/src/views/AR/index.js index ee449a5..f7ba184 100644 --- a/src/views/AR/index.js +++ b/src/views/AR/index.js @@ -1,7 +1,7 @@ import React, { Component } from "react"; import { connect } from "react-redux"; import { userProduct } from "~/Redux/actions"; - +import { Link } from "react-router-dom"; import Navbar from "../Home/Navbar/index"; import Footer from "../Home/Footer/index"; import Loader from "~/components/Loader/index"; @@ -11,62 +11,82 @@ import BreadCrumbs from "./BreadCrumb/index"; import "./index.scss"; const maxDesktopSize = 1250; +const maxMobileSize = 550; const fontSize = { + mobile: { + h1: window.innerWidth > maxMobileSize ? 24 : window.innerWidth / 20, + a: window.innerWidth > maxMobileSize ? 15 : window.innerWidth / 30, + p: window.innerWidth > maxMobileSize ? 14 : window.innerWidth / 30, + }, desktop: { - h1: window.innerWidth > maxDesktopSize ? 25 : window.innerWidth / 70, - p: window.innerHeight > maxDesktopSize ? 15 : window.innerWidth / 90, + h1: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 70, + a: window.innerHeight > maxDesktopSize ? 15 : window.innerWidth / 85, + p: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 90, }, }; class AR extends Component { componentDidMount() { window.scrollTo(0, 0); - // this.props.getArList({ type: 3 }); + this.props.getMyList({ isActive: 1, productType: 3 }); } render() { - const { data, arList } = this.props; + const { arList, loading } = this.props; + if (loading) + return ( +
+ +
+ ); + if (arList.length === 0) + return ( +
+ +
+

1000 + ? fontSize.desktop.p + : fontSize.mobile.p, + }} + > + برای استفاده از این بخش باید یک کتاب را فعالسازی کرده باشید +

+ فعالسازی کتاب +
+
+ ); return ( <> {window.innerWidth > 1000 ? ( - arList.length > 0 ? ( - <> -
- - -
-
-