amir hosein gorji 3 years ago
parent 69599d3c65
commit d957786743
  1. 8
      package.json
  2. 77
      scripts/start.js
  3. 6
      src/AppRouter.js
  4. 3
      src/QRScan/History/index.js
  5. 45
      src/QRScan/LastQr/index.js
  6. 46
      src/QRScan/LastQr/index.scss
  7. 47
      src/QRScan/Modal/index.js
  8. 92
      src/QRScan/Modal/index.scss
  9. 57
      src/QRScan/Scanner/index.js
  10. 242
      src/QRScan/index.js
  11. 167
      src/QRScan/index.scss
  12. 1
      src/Redux/reducers/public.js
  13. 1
      src/Redux/reducers/userFactor.js
  14. 6
      src/util/onInput.js
  15. 1
      src/views/AR/Item/index.js
  16. 40
      src/views/About/index.js
  17. 10
      src/views/About/index.scss
  18. 10
      src/views/Activation/index.js
  19. 26
      src/views/Auth/Login/Cellphone/index.js
  20. 17
      src/views/Auth/Profile/Input/index.js
  21. 1
      src/views/Auth/Profile/MultipleSelector/index.js
  22. 2
      src/views/Auth/Profile/index.js
  23. 23
      src/views/Blog/BreadCrumb/index.js
  24. 9
      src/views/Blog/index.js
  25. 1
      src/views/Cart/Discount/index.js
  26. 13
      src/views/Cart/index.js
  27. 10
      src/views/Checkout/Table/index.js
  28. 12
      src/views/Contact/index.js
  29. 2
      src/views/Download/Item/index.js
  30. 4
      src/views/Home/Download/index.js
  31. 1
      src/views/Home/HomeStatic/index.js
  32. 5
      src/views/Home/index.js
  33. 2
      src/views/MyBooks_old/index.js
  34. 2
      src/views/Orders/index.js
  35. 3
      src/views/Product/AddToCart/index.js
  36. 2
      src/views/Products/Product/index.js
  37. 28
      src/views/QR/VideoBox/React-video-js-player/index.js
  38. 2
      src/views/QR/VideoBox/index.js
  39. 11
      src/views/Sample/index.js
  40. 2
      src/views/Support/Upload/index.js
  41. 3
      src/views/Support/index.js
  42. 11
      yarn.lock

@ -56,6 +56,7 @@
"material-ui-audio-player": "https://github.com/RezaAshrafi77/material-ui-audio-player.git", "material-ui-audio-player": "https://github.com/RezaAshrafi77/material-ui-audio-player.git",
"material-ui-player": "^0.2.2", "material-ui-player": "^0.2.2",
"mini-css-extract-plugin": "0.11.3", "mini-css-extract-plugin": "0.11.3",
"modern-react-qr-reader": "^1.0.12",
"optimize-css-assets-webpack-plugin": "5.0.4", "optimize-css-assets-webpack-plugin": "5.0.4",
"pdf-viewer-reactjs": "^2.2.3", "pdf-viewer-reactjs": "^2.2.3",
"pnp-webpack-plugin": "1.6.4", "pnp-webpack-plugin": "1.6.4",
@ -108,8 +109,9 @@
}, },
"scripts": { "scripts": {
"start": "node scripts/start.js", "start": "node scripts/start.js",
"build": "node scripts/build.js", "build": "node scripts/build.js && npm run clean",
"test": "node scripts/test.js" "test": "node scripts/test.js",
"clean": "find ./build -name \"*.map\" -type f -delete"
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
@ -196,4 +198,4 @@
] ]
] ]
} }
} }

@ -1,39 +1,38 @@
'use strict'; "use strict";
// Do this as the first thing so that any code reading it knows the right env. // Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'development'; process.env.BABEL_ENV = "development";
process.env.NODE_ENV = 'development'; process.env.NODE_ENV = "development";
// Makes the script crash on unhandled rejections instead of silently // Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will // ignoring them. In the future, promise rejections that are not handled will
// terminate the Node.js process with a non-zero exit code. // terminate the Node.js process with a non-zero exit code.
process.on('unhandledRejection', err => { process.on("unhandledRejection", (err) => {
throw err; throw err;
}); });
// Ensure environment variables are read. // Ensure environment variables are read.
require('../config/env'); require("../config/env");
const fs = require("fs");
const fs = require('fs'); const chalk = require("react-dev-utils/chalk");
const chalk = require('react-dev-utils/chalk'); const webpack = require("webpack");
const webpack = require('webpack'); const WebpackDevServer = require("webpack-dev-server");
const WebpackDevServer = require('webpack-dev-server'); const clearConsole = require("react-dev-utils/clearConsole");
const clearConsole = require('react-dev-utils/clearConsole'); const checkRequiredFiles = require("react-dev-utils/checkRequiredFiles");
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
const { const {
choosePort, choosePort,
createCompiler, createCompiler,
prepareProxy, prepareProxy,
prepareUrls, prepareUrls,
} = require('react-dev-utils/WebpackDevServerUtils'); } = require("react-dev-utils/WebpackDevServerUtils");
const openBrowser = require('react-dev-utils/openBrowser'); const openBrowser = require("react-dev-utils/openBrowser");
const semver = require('semver'); const semver = require("semver");
const paths = require('../config/paths'); const paths = require("../config/paths");
const configFactory = require('../config/webpack.config'); const configFactory = require("../config/webpack.config");
const createDevServerConfig = require('../config/webpackDevServer.config'); const createDevServerConfig = require("../config/webpackDevServer.config");
const getClientEnvironment = require('../config/env'); const getClientEnvironment = require("../config/env");
const react = require(require.resolve('react', { paths: [paths.appPath] })); const react = require(require.resolve("react", { paths: [paths.appPath] }));
const env = getClientEnvironment(paths.publicUrlOrPath.slice(0, -1)); const env = getClientEnvironment(paths.publicUrlOrPath.slice(0, -1));
const useYarn = fs.existsSync(paths.yarnLockFile); const useYarn = fs.existsSync(paths.yarnLockFile);
@ -46,7 +45,7 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
// Tools like Cloud9 rely on this. // Tools like Cloud9 rely on this.
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000; const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
const HOST = process.env.HOST || '0.0.0.0'; const HOST = process.env.HOST || "0.0.0.0";
if (process.env.HOST) { if (process.env.HOST) {
console.log( console.log(
@ -60,32 +59,32 @@ if (process.env.HOST) {
`If this was unintentional, check that you haven't mistakenly set it in your shell.` `If this was unintentional, check that you haven't mistakenly set it in your shell.`
); );
console.log( console.log(
`Learn more here: ${chalk.yellow('https://cra.link/advanced-config')}` `Learn more here: ${chalk.yellow("https://cra.link/advanced-config")}`
); );
console.log(); console.log();
} }
// We require that you explicitly set browsers and do not fall back to // We require that you explicitly set browsers and do not fall back to
// browserslist defaults. // browserslist defaults.
const { checkBrowsers } = require('react-dev-utils/browsersHelper'); const { checkBrowsers } = require("react-dev-utils/browsersHelper");
checkBrowsers(paths.appPath, isInteractive) checkBrowsers(paths.appPath, isInteractive)
.then(() => { .then(() => {
// We attempt to use the default port but if it is busy, we offer the user to // We attempt to use the default port but if it is busy, we offer the user to
// run on a different port. `choosePort()` Promise resolves to the next free port. // run on a different port. `choosePort()` Promise resolves to the next free port.
return choosePort(HOST, DEFAULT_PORT); return choosePort(HOST, DEFAULT_PORT);
}) })
.then(port => { .then((port) => {
if (port == null) { if (port == null) {
// We have not found a port. // We have not found a port.
return; return;
} }
const config = configFactory('development'); const config = configFactory("development");
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; const protocol = process.env.HTTPS === "true" ? "https" : "http";
const appName = require(paths.appPackageJson).name; const appName = require(paths.appPackageJson).name;
const useTypeScript = fs.existsSync(paths.appTsConfig); const useTypeScript = fs.existsSync(paths.appTsConfig);
const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === 'true'; const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === "true";
const urls = prepareUrls( const urls = prepareUrls(
protocol, protocol,
HOST, HOST,
@ -93,10 +92,10 @@ checkBrowsers(paths.appPath, isInteractive)
paths.publicUrlOrPath.slice(0, -1) paths.publicUrlOrPath.slice(0, -1)
); );
const devSocket = { const devSocket = {
warnings: warnings => warnings: (warnings) =>
devServer.sockWrite(devServer.sockets, 'warnings', warnings), devServer.sockWrite(devServer.sockets, "warnings", warnings),
errors: errors => errors: (errors) =>
devServer.sockWrite(devServer.sockets, 'errors', errors), devServer.sockWrite(devServer.sockets, "errors", errors),
}; };
// Create a webpack compiler that is configured with custom messages. // Create a webpack compiler that is configured with custom messages.
const compiler = createCompiler({ const compiler = createCompiler({
@ -123,7 +122,7 @@ checkBrowsers(paths.appPath, isInteractive)
); );
const devServer = new WebpackDevServer(compiler, serverConfig); const devServer = new WebpackDevServer(compiler, serverConfig);
// Launch WebpackDevServer. // Launch WebpackDevServer.
devServer.listen(port, HOST, err => { devServer.listen(port, HOST, (err) => {
if (err) { if (err) {
return console.log(err); return console.log(err);
} }
@ -131,7 +130,7 @@ checkBrowsers(paths.appPath, isInteractive)
clearConsole(); clearConsole();
} }
if (env.raw.FAST_REFRESH && semver.lt(react.version, '16.10.0')) { if (env.raw.FAST_REFRESH && semver.lt(react.version, "16.10.0")) {
console.log( console.log(
chalk.yellow( chalk.yellow(
`Fast Refresh requires React 16.10 or higher. You are using React ${react.version}.` `Fast Refresh requires React 16.10 or higher. You are using React ${react.version}.`
@ -139,26 +138,26 @@ checkBrowsers(paths.appPath, isInteractive)
); );
} }
console.log(chalk.cyan('Starting the development server...\n')); console.log(chalk.cyan("Starting the development server...\n"));
openBrowser(urls.localUrlForBrowser); openBrowser(urls.localUrlForBrowser);
}); });
['SIGINT', 'SIGTERM'].forEach(function (sig) { ["SIGINT", "SIGTERM"].forEach(function (sig) {
process.on(sig, function () { process.on(sig, function () {
devServer.close(); devServer.close();
process.exit(); process.exit();
}); });
}); });
if (process.env.CI !== 'true') { if (process.env.CI !== "true") {
// Gracefully exit when stdin ends // Gracefully exit when stdin ends
process.stdin.on('end', function () { process.stdin.on("end", function () {
devServer.close(); devServer.close();
process.exit(); process.exit();
}); });
} }
}) })
.catch(err => { .catch((err) => {
if (err && err.message) { if (err && err.message) {
console.log(err.message); console.log(err.message);
} }

@ -70,7 +70,6 @@ class AppRouter extends Component {
render() { render() {
const mobile = window.innerWidth < 1000 ? true : false; const mobile = window.innerWidth < 1000 ? true : false;
let status = proxy.status(); let status = proxy.status();
console.log({ status, s: this.props.profile });
const afterLogin = localStorage.getItem("afterLogin"); const afterLogin = localStorage.getItem("afterLogin");
let home = ( let home = (
@ -79,8 +78,6 @@ class AppRouter extends Component {
<Auth page={"profile"} /> <Auth page={"profile"} />
) : afterLogin ? ( ) : afterLogin ? (
<> <>
{localStorage.removeItem("afterLogin")}
{console.log("hhhhhhhhhhhhhhhhhhaaaaaaaaa")}
<Redirect <Redirect
to={{ to={{
pathname: afterLogin, pathname: afterLogin,
@ -109,6 +106,9 @@ class AppRouter extends Component {
<Route exact path={"/blogs/:id"}> <Route exact path={"/blogs/:id"}>
<Blog /> <Blog />
</Route> </Route>
<Route exact path={"/page/:name"}>
<Blog />
</Route>
<Route exact path={"/about"}> <Route exact path={"/about"}>
<About /> <About />
</Route> </Route>

@ -0,0 +1,3 @@
import { createBrowserHistory } from "history";
export default createBrowserHistory();

@ -0,0 +1,45 @@
import React from "react";
import { Link } from "react-router-dom";
import "./index.scss";
const grades = [
"اول",
"دوم",
"سوم",
"چهارم",
"پنجم",
"ششم",
"هفتم",
"هشتم",
"نهم",
"دهم",
"یازدهم",
"دوازدهم",
];
export default function LastQR(props) {
const { data } = props;
return (
<>
{window.innerWidth > 1000 ? <div className="last-qr"></div> : null}
{window.innerWidth < 1000 ? (
<Link to={`/qr${data.link}`} className="mobile-last-qr d-flex">
<div className="mobile-last-qr__right d-flex">
<img
src={`https://dnvn.ir/api/v1/file/${data.fileIds}`}
alt={data.name}
/>
<div className="d-flex flex-column">
<strong>{data.name}</strong>
<span>{grades[data.gradeId]}</span>
</div>
</div>
<div className="mobile-last-qr__left d-flex">
<button>صفحه {data.pagesNum}</button>
</div>
</Link>
) : null}
</>
);
}

@ -0,0 +1,46 @@
.mobile-last-qr {
width: 100%;
padding: 15px 10px;
justify-content: space-between;
background-color: white;
align-items: center;
border-radius: 10px;
box-shadow: 0px 0px 10px rgb(226, 226, 226);
text-decoration: none;
&__right {
align-items: center;
img {
height: 100px;
border-radius: 10px;
margin-left: 15px;
}
strong {
font-family: numeralMedium;
font-size: calc(100vw / 25);
font-weight: 600;
letter-spacing: -1px;
color: #4e4e4e;
}
span {
font-family: numeralMedium;
font-size: calc(100vw / 30);
color: #00cc69;
}
}
&__left {
button {
display: inline;
font-family: numeralLight;
text-decoration: none;
padding: 5px 20px 3px;
border: 1px solid #00cc69;
background-color: white;
border-radius: 25px;
font-size: calc(100vw / 26);
color: #00cc69;
&:focus:enabled {
text-decoration: none;
}
}
}
}

@ -0,0 +1,47 @@
import React, { Component } from "react";
import { Link } from "react-router-dom";
import "./index.scss";
const maxMobileSize = 550;
const fontSize = {
mobile: {
span: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 17,
a: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 20,
},
};
export default class QRModal extends Component {
render() {
const { tail, parent } = this.props;
return (
<>
{window.innerWidth < 1000 ? (
<div className="mobile-qr-modal d-flex flex-column justify-content-center align-items-center">
<span style={{ fontSize: fontSize.mobile.span }}>
اسکن کد QR موفقیت آمیز بود.
</span>
<Link style={{ fontSize: fontSize.mobile.a }} to={"/qr"}>
{tail}
</Link>
<button onClick={() => parent.setState({ tail: null })}>
انصراف
</button>
</div>
) : (
<div className="qr-modal d-flex flex-column justify-content-center align-items-center">
<span style={{ fontSize: fontSize.mobile.span }}>
اسکن کد QR موفقیت آمیز بود.
</span>
<Link style={{ fontSize: fontSize.mobile.a }} to={"/qr"}>
{tail}
</Link>
<button onClick={() => parent.setState({ tail: null })}>
انصراف
</button>
</div>
)}
</>
);
}
}

@ -0,0 +1,92 @@
.mobile-qr-modal {
position: fixed;
left: 0px;
background-color: rgba(0, 0, 0, 0.856);
top: 0px;
width: 100vw;
height: 100vh;
z-index: 500;
animation-name: qrModal;
animation-duration: 0.4s;
span {
font-family: numeralLight;
color: white;
}
a {
text-decoration: none;
width: 50%;
margin: 25px auto;
background-color: #00cc69;
border: 2px solid white;
padding: 20px 0px;
text-align: center;
color: white;
font-family: numeralLight;
border-radius: 25px;
}
button {
text-decoration: none;
width: 30%;
min-width: 100px;
margin: 15px auto;
background-color: #cc001b;
border: 2px solid white;
padding: 5px 0px;
text-align: center;
color: white;
font-family: numeralLight;
border-radius: 25px;
}
}
.qr-modal {
position: fixed;
left: 0px;
background-color: rgba(0, 0, 0, 0.925);
top: 0px;
width: 100vw;
height: 100vh;
z-index: 500;
animation-name: qrModal;
animation-duration: 0.4s;
span {
font-family: numeralLight;
color: white;
}
a {
text-decoration: none;
width: 50%;
margin: 25px auto;
background-color: #00cc69;
border: 2px solid white;
padding: 20px 0px;
text-align: center;
color: white;
font-family: numeralLight;
border-radius: 25px;
}
button {
text-decoration: none;
width: 25%;
max-width: 100px;
margin: 15px auto;
background-color: #cc001b;
border: 2px solid white;
padding: 10px 0px;
text-align: center;
color: white;
font-family: numeralLight;
border-radius: 25px;
}
}
@keyframes qrModal {
0% {
left: -100vw;
top: 0px;
}
100% {
left: 0px;
top: 0px;
}
}

@ -0,0 +1,57 @@
import React, { Component } from "react";
//import QrReader from "react-camera-qr";
import QrReader from "react-qr-reader";
export default class Scanner extends Component {
constructor(props) {
super(props);
this.state = {
delay: 100,
result: "",
};
this.handleScan = this.handleScan.bind(this);
}
handleScan(data) {
this.props.parent.setState({
value: data,
});
}
handleError(err) {
console.error(err);
}
render() {
let cam = this.props.parent.state.cameraId;
let facingMode = this.props.parent.state.cameraId;
return (
<>
{window.innerWidth < 1000 ? (
<QrReader
delay={800 + Math.random() * 10}
onError={this.handleError}
onScan={this.handleScan}
style={{ width: "100%" }}
cameraId={cam}
facingMode={facingMode}
/>
) : null}
{window.innerWidth > 1000 ? (
<QrReader
delay={800 + Math.random() * 10}
onError={this.handleError}
onScan={this.handleScan}
style={{ width: "100%" }}
cameraId={cam}
facingMode={facingMode}
/>
) : null}
{/* <div>{facingMode[this.props.parent.state.facingMode]}</div>
<div>{(this.state?.devices || []).join(",")}</div> */}
</>
);
}
}

@ -0,0 +1,242 @@
import React, { Component } from "react";
import Navbar from "../Home/Navbar/index";
import Footer from "../Home/Footer/index";
import Scanner from "./Scanner/index";
import LastQr from "./LastQr/index";
import Modal from "./Modal/index";
import ReplayIcon from "@material-ui/icons/Replay";
import FlipCameraIosIcon from "@material-ui/icons/FlipCameraIos";
import { connect } from "react-redux";
import { qr } from "~/Redux/actions";
import sciense_6 from "../../assets/images/sciense-6.png";
import "./index.scss";
const maxDesktopSize = 1250;
const fontSize = {
desktop: {
h1: window.innerWidth > maxDesktopSize ? 25 : window.innerWidth / 70,
p: window.innerHeight > maxDesktopSize ? 15 : window.innerWidth / 90,
},
};
class QRScan extends Component {
state = {
value: null,
facingMode: 0,
tail: null,
cameraIds: [],
cameraId: "rare",
};
componentDidMount() {
navigator.mediaDevices.enumerateDevices().then((devices) => {
console.log({ devices });
var cameraIds = devices
.filter(function (device) {
return device.kind === "videoinput";
})
.map((e) => [e.label, e.deviceId]);
var environmentPattern = /rear|back|environment/gi;
var userPattern = /front|user|face/gi;
var backs = cameraIds.filter((label) => environmentPattern.test(label));
var notFronts = cameraIds.filter((label) => !userPattern.test(label));
let cameraId = backs[0] || notFronts[0] || cameraIds[0];
let cameraIdx = cameraIds.findIndex((cam) => cam[1] === cameraId[1]);
console.log({
cameraIds,
cameraId: cameraId[0],
cameraIdx,
});
this.setState({
cameraIds,
cameraId,
cameraIdx,
});
});
}
async componentDidUpdate() {
if (this.state.value) {
let tail = this.state.value.slice(
this.state.value.lastIndexOf("/") + 1,
this.state.value.length
);
this.props.info({ tail: tail });
this.setState({ value: null, tail: tail });
}
}
render() {
const { data } = this.props;
return (
<>
{window.innerWidth > 100 ? (
<>
<div className="qr-scan d-flex flex-column align-items-center">
<Navbar />
<div className="qr-scan__box d-flex flex-column">
<header className="qr-scan__box--header d-flex flex-column">
<h1 style={{ fontSize: fontSize.desktop.h1 }}>نکته</h1>
<p style={{ fontSize: fontSize.desktop.p }}>
لطفا دوربین خود را روی کدی که در اختیار شما قرار گرفته قرار
دهید تا اسکن دوربین انجام شود
</p>
</header>
{this.state.cameraIds.length > 1 ? (
<div className="qr-scan__box--select d-flex">
<select
value={this.state.cameraId}
onChange={(e) =>
this.setState({
facingMode: Math.round() * 3,
cameraId: e.target.value,
})
}
>
{this.state.cameraIds.map((e) => (
<option value={e[1]}>{e[0] || e[1]}</option>
))}
</select>
</div>
) : null}
<section className="qr-scan__box--camera d-flex justify-content-center align-items-center">
<FlipCameraIosIcon
style={{
fontSize: 35,
position: "absolute",
left: 10,
top: 10,
zIndex: 100,
color: "white",
}}
onClick={() =>
this.setState({
facingMode: (this.state.facingMode + 1) % 2,
})
}
/>
{this.state.value !== null ? (
<div
style={{ zIndex: 1000 }}
onClick={() => this.setState({ value: null })}
>
<ReplayIcon style={{ fontSize: 40, color: "grey" }} />
</div>
) : (
<Scanner parent={this} cameraId={this.state.cameraId} />
)}
</section>
{this.state.tail === null ? null : (
<Modal tail={this.state.tail} />
)}
</div>
</div>
<Footer />
</>
) : null}
{window.innerWidth < 100 ? (
<>
<div className="mobile-qr-scan d-flex flex-column">
<Navbar page="qr-scan" />
{/* <div className="mobile-qr-scan__back d-flex">
<Link to="/">بازگشت</Link>
</div> */}
<header className="mobile-qr-scan__header d-flex flex-column"></header>
<section className="mobile-qr-scan__camera d-flex justify-content-center align-items-center">
{this.state.cameraIds.length > 1 ? (
<>
<div
className="qr-scan__box--select d-flex"
style={{ position: "absolute", zIndex: 500 }}
>
<select
value={this.state.cameraId}
onChange={(e) =>
this.setState({
facingMode: Math.round() * 3,
cameraId: e.target.value,
})
}
>
{this.state.cameraIds.map((e) => (
<option value={e[1]}>
{e[0]}
{e[1]}
</option>
))}
</select>
</div>
<FlipCameraIosIcon
style={{
fontSize: 35,
position: "absolute",
left: 10,
top: 10,
zIndex: 100,
color: "white",
}}
onClick={() => {
let cameraIdx =
(this.state.cameraIdx + 1) %
this.state.cameraIds.length;
this.setState({
cameraIdx,
cameraId: this.state.cameraIds[cameraIdx],
});
}}
/>
</>
) : null}
{false && this.state.cameraId === "" ? (
<div
style={{ zIndex: 1000 }}
onClick={() => this.setState({ value: null })}
>
<ReplayIcon style={{ fontSize: 40, color: "grey" }} />
</div>
) : (
<Scanner parent={this} cameraId={this.state.cameraId} />
)}
</section>
{this.state.tail === null ? null : (
<Modal parent={this} tail={this.state.tail} />
)}
{localStorage.getItem("latestQr") ? (
<section className="mobile-qr-scan__lasts d-flex flex-column">
<h2>آخرین مشاهدات</h2>
{data.map((item, i) => (
<LastQr
data={JSON.parse(localStorage.getItem("latestQr"))}
key={i}
/>
))}
</section>
) : null}
</div>
</>
) : null}
</>
);
}
}
export default connect((state) => ({ list: state.qr.list }), { info: qr.info })(
QRScan
);
QRScan.defaultProps = {
data: [
{
title: "ریاضیات گسسته خیلی پیشرفته",
subTitle: "پایه هفتم ابتدایی",
page: 13,
image: sciense_6,
},
],
};

@ -0,0 +1,167 @@
.mobile-qr-scan {
width: 100vw;
max-width: 1250px;
margin: 0px auto;
padding: 0px 10px 40px;
direction: rtl;
padding-top: 70px;
overflow-x: hidden;
&__back {
justify-content: space-around;
a {
display: inline;
font-family: numeralLight;
text-decoration: none;
padding: 5px 20px 3px;
background-color: #00cc69;
border-radius: 25px;
font-size: calc(100vw / 26);
color: white;
&:focus:enabled {
text-decoration: none;
}
}
}
&__header {
width: 100%;
h1 {
font-family: numeralMedium;
color: #4ce1be;
font-size: calc(100vw / 13);
}
p {
text-align: justify;
font-family: numeralMedium;
color: #4ce1be;
font-size: calc(100vw / 28);
}
}
&__select {
select {
margin-top: 10px;
border-radius: 4px;
position: relative;
background-color: #efefef;
border: 1px solid #a5a5a5;
font-size: 16px;
color: black;
// maxWidth : 70;
min-width: 80;
height: 35px;
padding: 5px;
font-family: numeralLight;
&:focus {
border-radius: 4;
}
}
}
&__camera {
// margin-top: 20px;
width: 100%;
border-radius: 10px;
margin: 5px auto;
position: relative;
&--shape {
position: absolute;
background-color: rgba(0, 0, 0, 0.8);
}
}
&__text {
text-align: justify;
font-family: numeralMedium;
color: #4ce1be;
font-size: calc(100vw / 28);
}
&__lasts {
width: 100%;
margin: 15px 0px;
h2 {
font-family: numeralMedium;
color: #02a255;
font-size: calc(100vw / 24);
margin-bottom: 20px;
}
}
}
.qr-scan {
width: 100vw;
max-width: 1250px;
min-height: calc(100vh - 288px);
margin: 0px auto;
padding: 0px 10px;
direction: rtl;
overflow-x: hidden;
padding-top: 80px;
&__back {
justify-content: flex-start;
a {
display: inline;
font-family: numeralLight;
text-decoration: none;
padding: 5px 20px 3px;
background-color: #00cc69;
border-radius: 25px;
font-size: calc(100vw / 70);
color: white;
&:focus:enabled {
text-decoration: none;
}
}
}
&__box {
width: 100%;
max-width: 700px;
&--header {
width: 100%;
h1 {
font-family: numeralMedium;
color: #00cc69;
}
p {
font-family: numeralLight;
color: #4d4d4f;
}
}
&--select {
select {
margin-top: 10px;
border-radius: 4px;
position: relative;
background-color: #efefef;
border: 1px solid #a5a5a5;
font-size: 16px;
color: black;
// maxWidth : 70;
min-width: 80;
height: 35px;
padding: 5px;
font-family: numeralLight;
&:focus {
border-radius: 4;
}
}
}
&--camera {
margin-top: 20px;
width: 100%;
max-width: 300px;
margin: 0px auto 40px;
* {
border-radius: 10px;
}
}
&--text {
margin-top: 30px;
width: 100%;
p {
font-family: numeralLight;
color: #4d4d4f;
}
}
p {
font-family: numeralLight;
color: #4d4d4f;
}
}
}

@ -71,7 +71,6 @@ export default function publicApi(state = initialState, action) {
...state, ...state,
newProducts: realList, newProducts: realList,
}; };
console.log("here1");
} }
const level = data.levels; const level = data.levels;
const search = data.search; const search = data.search;

@ -17,7 +17,6 @@ export default function userFactor(state = initialState, action) {
case "userFactor/info": case "userFactor/info":
return { ...state, loading: false, info: data, error: null }; return { ...state, loading: false, info: data, error: null };
case "userFactor/update": case "userFactor/update":
console.log("userFactor/update");
toast.success("درخواست شما با موفقیت انجام شد."); toast.success("درخواست شما با موفقیت انجام شد.");
return { ...state, loading: false, error: null }; return { ...state, loading: false, error: null };
case "userFactor/add": case "userFactor/add":

@ -74,7 +74,7 @@ class onInput {
newText = newText.replace(/M/g, ""); newText = newText.replace(/M/g, "");
newText = newText.replace(/\?/g, ""); newText = newText.replace(/\?/g, "");
if (!newText) { if (!newText) {
toast.info("از کاراکتر فارسی استفاده کنید"); // toast.info("از کاراکتر فارسی استفاده کنید");
} }
return newText; return newText;
}; };
@ -133,7 +133,7 @@ class onInput {
newText = newText.replace(/ی/g, ""); newText = newText.replace(/ی/g, "");
newText = newText.replace(/\?/g, ""); newText = newText.replace(/\?/g, "");
if (!newText) { if (!newText) {
toast.info("از کاراکتر انگلیسی واعداداستفاده کنید"); // toast.info("از کاراکتر انگلیسی واعداداستفاده کنید");
} }
return newText; return newText;
}; };
@ -240,7 +240,7 @@ class onInput {
newText = newText.replace(/N/g, ""); newText = newText.replace(/N/g, "");
newText = newText.replace(/M/g, ""); newText = newText.replace(/M/g, "");
if (!newText) { if (!newText) {
toast.info("از اعداداستفاده کنید"); // toast.info("از اعداداستفاده کنید");
} }
return newText; return newText;
}; };

@ -18,7 +18,6 @@ const grades = [
export default class Item extends Component { export default class Item extends Component {
render() { render() {
const { data } = this.props; const { data } = this.props;
console.log({ data });
return ( return (
<> <>
{/* {window.innerWidth < 1000 ? ( */} {/* {window.innerWidth < 1000 ? ( */}

@ -179,6 +179,23 @@ export default class About extends Component {
{window.innerWidth < 1000 ? ( {window.innerWidth < 1000 ? (
<div className="mobile-about d-flex flex-column"> <div className="mobile-about d-flex flex-column">
<Navbar page={"about"} /> <Navbar page={"about"} />
<div className="about__first d-flex" style={{ width: "100%" }}>
<div className="top align-self-start">
<h1 style={{ fontSize: fontSize.mobile.h1 }}>{first.title}</h1>
<p
style={{
fontSize: fontSize.mobile.p + 2,
lineHeight: 2,
}}
>
{first.text}
</p>
</div>
</div>
<div
className="linegr"
style={{ width: "100%", height: "4px", marginBottom: 15 }}
></div>
<div className="mobile-about__fury d-flex flex-column"> <div className="mobile-about__fury d-flex flex-column">
<div> <div>
<h1 style={{ fontSize: fontSize.mobile.h1 }}>{fury.title}</h1> <h1 style={{ fontSize: fontSize.mobile.h1 }}>{fury.title}</h1>
@ -200,7 +217,6 @@ export default class About extends Component {
{keywords.list.map((item, i) => ( {keywords.list.map((item, i) => (
<Fragment key={i}> <Fragment key={i}>
<li style={{ fontSize: fontSize.mobile.li }}>{item}</li> <li style={{ fontSize: fontSize.mobile.li }}>{item}</li>
<br />
</Fragment> </Fragment>
))} ))}
</ul> </ul>
@ -218,7 +234,6 @@ export default class About extends Component {
{advantages.list.map((item, i) => ( {advantages.list.map((item, i) => (
<Fragment key={i}> <Fragment key={i}>
<li style={{ fontSize: fontSize.mobile.li }}>{item}</li> <li style={{ fontSize: fontSize.mobile.li }}>{item}</li>
<br />
</Fragment> </Fragment>
))} ))}
</ul> </ul>
@ -239,26 +254,5 @@ About.defaultProps = {
: "mobile-about__images--1", : "mobile-about__images--1",
imageUrl: aboutLg, imageUrl: aboutLg,
}, },
{
class:
window.innerWidth > 1000
? "about__fury--left__2"
: "mobile-about__images--2",
imageUrl: aboutMd,
},
{
class:
window.innerWidth > 1000
? "about__fury--left__3"
: "mobile-about__images--3",
imageUrl: aboutXs1,
},
{
class:
window.innerWidth > 1000
? "about__fury--left__4"
: "mobile-about__images--4",
imageUrl: aboutXs2,
},
], ],
}; };

@ -185,13 +185,8 @@
position: absolute; position: absolute;
} }
&--1 { &--1 {
top: 0px;
left: calc(100vw / 8);
z-index: 100; z-index: 100;
height: calc(100vw - 100px); width: 100%;
width: calc(100vw - 100px);
max-width: 275px;
max-height: 275px;
} }
&--2 { &--2 {
right: -20px; right: -20px;
@ -222,6 +217,7 @@
} }
} }
&__keys { &__keys {
margin: 20px;
transform: translateY(-40px); transform: translateY(-40px);
h2 { h2 {
display: inline; display: inline;
@ -249,7 +245,7 @@
} }
} }
&__advantages { &__advantages {
margin-top: 30px; margin: 30px 20px;
h1 { h1 {
display: inline; display: inline;
font-family: numeralMedium; font-family: numeralMedium;

@ -56,10 +56,7 @@ class Activation extends Component {
وارد تا کتاب الکترونیک آن فعالسازی شود وارد تا کتاب الکترونیک آن فعالسازی شود
</p> </p>
</div> </div>
<div <div className="activation__form d-flex">
className="activation__form d-flex"
// onSubmit={() => console.log()}
>
<input <input
id="code" id="code"
type="text" type="text"
@ -137,10 +134,7 @@ class Activation extends Component {
<Scanner parent={this} /> <Scanner parent={this} />
)} )}
</div> */} </div> */}
<div <div className="mobile-activation__form d-flex flex-column">
className="mobile-activation__form d-flex flex-column"
// onSubmit={() => console.log()}
>
<div className="inputBox d-flex"> <div className="inputBox d-flex">
<Link to="/qr-scan" className="qrb"> <Link to="/qr-scan" className="qrb">
<img src={qrcode} alt="qr" /> <img src={qrcode} alt="qr" />

@ -1,5 +1,5 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { Link } from "react-router-dom";
import logo from "../../../../assets/icons/logo.png"; import logo from "../../../../assets/icons/logo.png";
import iran from "../../../../assets/icons/iran.png"; import iran from "../../../../assets/icons/iran.png";
import pic from "../../../../assets/images/pic.png"; import pic from "../../../../assets/images/pic.png";
@ -78,9 +78,16 @@ export default class Cellphone extends Component {
</button> </button>
</form> </form>
<div className="auth-cellphone__box--footer d-flex flex-column justify-content-center align-items-center"> <div className="auth-cellphone__box--footer d-flex flex-column justify-content-center align-items-center">
<div style={{ fontSize: fontSize.desktop.div }}> <Link
style={{
fontSize: fontSize.desktop.div,
textDecoration: "none",
color: "gray",
}}
to="/page/privacy"
>
شرایط استفاده و حریم خصوصی شرایط استفاده و حریم خصوصی
</div> </Link>
</div> </div>
</div> </div>
<div style={{ width: "48%", height: "100%", opacity: 0 }}> <div style={{ width: "48%", height: "100%", opacity: 0 }}>
@ -139,12 +146,17 @@ export default class Cellphone extends Component {
ادامه ادامه
</button> </button>
</form> </form>
<div <Link
style={{ fontSize: fontSize.mobile.div }} to="/page/privacy"
style={{
textDecoration: "none",
color: "gray",
fontSize: fontSize.mobile.div,
}}
className="mobile-auth-cellphone__footer d-flex flex-column justify-content-center align-items-center" className="mobile-auth-cellphone__footer d-flex flex-column justify-content-center align-items-center"
> >
<div>شرایط استفاده و حریم خصوصی</div> شرایط استفاده و حریم خصوصی
</div> </Link>
</div> </div>
) : null} ) : null}
</> </>

@ -1,8 +1,9 @@
import React from "react"; import React, { useState } from "react";
import TextField from "@material-ui/core/TextField"; import TextField from "@material-ui/core/TextField";
import { makeStyles } from "@material-ui/core/styles"; import { makeStyles } from "@material-ui/core/styles";
export default function FormPropsTextFields(props) { export default function FormPropsTextFields(props) {
const [value, setValue] = useState(props.defaultValue[props.name]);
const useStyles = makeStyles((theme) => ({ const useStyles = makeStyles((theme) => ({
root: { root: {
"& .MuiTextField-root": { "& .MuiTextField-root": {
@ -19,7 +20,7 @@ export default function FormPropsTextFields(props) {
})); }));
const classes = useStyles(); const classes = useStyles();
const { parent, defaultValue, maxLength, onInput, variant, required } = props; const { parent, maxLength, onInput, variant, required } = props;
return ( return (
<form className={classes.root} noValidate autoComplete="off"> <form className={classes.root} noValidate autoComplete="off">
<div> <div>
@ -28,16 +29,14 @@ export default function FormPropsTextFields(props) {
name={props.name} name={props.name}
label={props.label} label={props.label}
variant={variant || "outlined"} variant={variant || "outlined"}
onChange={(e) => parent.onChange(e.target.name, e.target.value)} onChange={(e) => {
parent.onChange(e.target.name, e.target.value);
}}
// defaultValue={defaultValue[props.name] || ""} // defaultValue={defaultValue[props.name] || ""}
value={defaultValue[props.name] || ""} value={value || ""}
required={required} required={required}
inputProps={{ maxLength }} inputProps={{ maxLength }}
onInput={ onInput={(e) => setValue(onInput(e.target.value))}
onInput
? (e) => (e.target.value = onInput(e.target.value))
: () => {}
}
/> />
</div> </div>
</form> </form>

@ -65,7 +65,6 @@ export default function MultipleSelector(props) {
className={`${classes.formControl} mobile-multiple-selector`} className={`${classes.formControl} mobile-multiple-selector`}
> >
<InputLabel id="demo-mutiple-name-label">{label}</InputLabel> <InputLabel id="demo-mutiple-name-label">{label}</InputLabel>
{console.log(selectedOptions)}
<Select <Select
labelId="demo-mutiple-name-label" labelId="demo-mutiple-name-label"
id="demo-mutiple-name" id="demo-mutiple-name"

@ -88,7 +88,6 @@ class Profile extends Component {
[name]: value, [name]: value,
}); });
} else if (name === "status") { } else if (name === "status") {
console.log(this.state);
this.setState((prevState) => ({ this.setState((prevState) => ({
gradeIds: String(prevState?.gradeIds || "").slice(0, 1) || "", gradeIds: String(prevState?.gradeIds || "").slice(0, 1) || "",
[name]: value, [name]: value,
@ -310,7 +309,6 @@ class Profile extends Component {
/> />
</div> </div>
) : null} ) : null}
{console.log(this.props.province)}
<div className="mb-2" style={{ minWidth: "100%" }}> <div className="mb-2" style={{ minWidth: "100%" }}>
<Select <Select
parent={this} parent={this}

@ -13,6 +13,7 @@ const fontSize = {
export default function ActiveLastBreadcrumb(props) { export default function ActiveLastBreadcrumb(props) {
const { name } = props; const { name } = props;
const isblog = window.location.pathname.includes("blog");
return ( return (
<Breadcrumbs aria-label="breadcrumb"> <Breadcrumbs aria-label="breadcrumb">
<Link <Link
@ -24,22 +25,24 @@ export default function ActiveLastBreadcrumb(props) {
> >
صفحه اصلی صفحه اصلی
</Link> </Link>
<Link {isblog ? (
style={{ <Link
fontSize: style={{
window.innerWidth > 1000 ? fontSize.desktop : fontSize.mobile, fontSize:
}} window.innerWidth > 1000 ? fontSize.desktop : fontSize.mobile,
to={"/blogs"} }}
> to={"/blogs"}
وبلاگ >
</Link> وبلاگ
</Link>
) : null}
<Link <Link
style={{ style={{
fontSize: fontSize:
window.innerWidth > 1000 ? fontSize.desktop : fontSize.mobile, window.innerWidth > 1000 ? fontSize.desktop : fontSize.mobile,
color: "#00CC69", color: "#00CC69",
}} }}
to={`/blogs/${window.location.pathname.slice( to={`/${isblog ? "blogs" : "page"}/${window.location.pathname.slice(
window.location.pathname.lastIndexOf("/") + 1, window.location.pathname.lastIndexOf("/") + 1,
window.location.pathname.length window.location.pathname.length
)}`} )}`}

@ -14,13 +14,14 @@ import "./index.scss";
const maxDesktopSize = 1250; const maxDesktopSize = 1250;
class Blog extends Component { class Blog extends Component {
getId() {
return window.location.pathname.split("/").slice(-1)[0];
}
componentDidMount() { componentDidMount() {
let id = this.getId();
window.scrollTo(0, 0); window.scrollTo(0, 0);
this.props.getBlogInfo({ this.props.getBlogInfo({
id: window.location.pathname.slice( [isNaN(+id) ? "name" : "id"]: id,
window.location.pathname.lastIndexOf("/") + 1,
window.location.pathname.length
),
}); });
} }

@ -33,7 +33,6 @@ const DiscoutCode = ({
function setOff() { function setOff() {
setCodeId({ offCodeValue: value, userId: userId, id: factorId || null }); setCodeId({ offCodeValue: value, userId: userId, id: factorId || null });
} }
console.log({ code });
return ( return (
<> <>
{window.innerWidth > 1000 ? ( {window.innerWidth > 1000 ? (

@ -9,9 +9,12 @@ import DiscoutCode from "./Discount/index";
import DeliveryMethod from "./DeliveryMethod/index"; import DeliveryMethod from "./DeliveryMethod/index";
import Factor from "./Factor/index"; import Factor from "./Factor/index";
import Loader from "~/components/Loader/index"; import Loader from "~/components/Loader/index";
import { Link } from "react-router-dom"; import { Link, useHistory } from "react-router-dom";
import "./index.scss"; import "./index.scss";
function Navigate({ path }) {
let history = useHistory();
return <>{history.push(path)}</>;
}
const maxDesktopSize = 1250; const maxDesktopSize = 1250;
const maxMobileSize = 550; const maxMobileSize = 550;
@ -77,6 +80,8 @@ class Cart extends Component {
} }
componentDidMount() { componentDidMount() {
localStorage.removeItem("afterLogin");
window.scrollTo(0, 0); window.scrollTo(0, 0);
this.props.getTransportList(); this.props.getTransportList();
this.props.getFactorInfo({}); this.props.getFactorInfo({});
@ -114,7 +119,7 @@ class Cart extends Component {
}; };
render() { render() {
const { list, payPrice, payMethods, factorInfo, userId } = this.props; const { list, payPrice, payMethods, factorInfo } = this.props;
if (!factorInfo || list.length === 0) if (!factorInfo || list.length === 0)
return ( return (
<div <div
@ -153,6 +158,8 @@ class Cart extends Component {
{window.location.search.includes("NOK") || {window.location.search.includes("NOK") ||
this.props.isVerified === false ? ( this.props.isVerified === false ? (
<div>پرداخت شما با خطا مواجه شد ، لطفا مجدد تلاش نمایید</div> <div>پرداخت شما با خطا مواجه شد ، لطفا مجدد تلاش نمایید</div>
) : window.location.search.includes("OK") ? (
<Navigate path="/orders" />
) : null} ) : null}
<div <div
className="d-flex" className="d-flex"

@ -10,7 +10,6 @@ import TableContainer from "@material-ui/core/TableContainer";
import TableHead from "@material-ui/core/TableHead"; import TableHead from "@material-ui/core/TableHead";
import TableRow from "@material-ui/core/TableRow"; import TableRow from "@material-ui/core/TableRow";
import Paper from "@material-ui/core/Paper"; import Paper from "@material-ui/core/Paper";
import DeleteOutlineOutlinedIcon from "@material-ui/icons/DeleteOutlineOutlined";
import "./index.scss"; import "./index.scss";
const useStyles = makeStyles({ const useStyles = makeStyles({
@ -76,13 +75,6 @@ const fontSize = {
function BasicTable(props) { function BasicTable(props) {
const classes = useStyles(); const classes = useStyles();
const { list, handleDelete, route, factorInfo } = props; const { list, handleDelete, route, factorInfo } = props;
const sum = () => {
let total = 0;
for (let i = 0; i < list.length; i++) {
total += list[i].count * 1;
}
return total;
};
return ( return (
<> <>
@ -150,7 +142,7 @@ function BasicTable(props) {
} }
const Item = (props) => { const Item = (props) => {
const { data, pushToCart, id, route } = props; const { data, route } = props;
return ( return (
<> <>
{window.innerWidth < 1000 ? ( {window.innerWidth < 1000 ? (

@ -4,8 +4,7 @@ import { publicApi, userProduct } from "~/Redux/actions";
import Navbar from "../Home/Navbar/index"; import Navbar from "../Home/Navbar/index";
import Footer from "../Home/Footer/index"; import Footer from "../Home/Footer/index";
import Input from "./Input/index";
import Select from "./Select/index";
import location from "../../assets/icons/location.png"; import location from "../../assets/icons/location.png";
import home from "../../assets/icons/home.png"; import home from "../../assets/icons/home.png";
import contact from "../../assets/icons/contact.png"; import contact from "../../assets/icons/contact.png";
@ -41,8 +40,7 @@ class Contact extends Component {
}; };
componentDidMount() { componentDidMount() {
// this.props.getList(); if (!this.props.contactData?.address) this.props.getContactData();
this.props.getContactData();
} }
render() { render() {
@ -110,7 +108,7 @@ class Contact extends Component {
<div className="mobile-contact__address--location d-flex align-items-center"> <div className="mobile-contact__address--location d-flex align-items-center">
<img src={location} alt="آدرس" className="m-1" /> <img src={location} alt="آدرس" className="m-1" />
<p style={{ fontSize: fontSize.mobile.p }}> <p style={{ fontSize: fontSize.mobile.p }}>
تهران، میدان فردوسی، خیابان موسوی، پلاک ۳۰ {contactData?.address || ""}{" "}
</p> </p>
</div> </div>
<div <div
@ -119,13 +117,13 @@ class Contact extends Component {
> >
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<span style={{ fontSize: fontSize.mobile.span }}> <span style={{ fontSize: fontSize.mobile.span }}>
۸۸۸۱۴۶۳۷ {contactData?.cellphone || ""}{" "}
</span> </span>
<img src={contact} alt="تماس" className="m-1" /> <img src={contact} alt="تماس" className="m-1" />
</div> </div>
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<span style={{ fontSize: fontSize.mobile.span }}> <span style={{ fontSize: fontSize.mobile.span }}>
Info@Danovin.ir {contactData?.email || ""}
</span> </span>
<img src={home} alt="خانه" className="m-1" /> <img src={home} alt="خانه" className="m-1" />
</div> </div>

@ -33,11 +33,11 @@ const grades = [
export default class Item extends Component { export default class Item extends Component {
render() { render() {
const { data } = this.props; const { data } = this.props;
console.log({ data });
return ( return (
<> <>
{window.innerWidth < 1000 ? ( {window.innerWidth < 1000 ? (
<a <a
rel="noreferrer"
href={`https://ar.dnvn.ir/lunch?id=${data.id}`} href={`https://ar.dnvn.ir/lunch?id=${data.id}`}
target="_blank" target="_blank"
className="mobile-products-product d-flex flex-column" className="mobile-products-product d-flex flex-column"

@ -15,7 +15,7 @@ const H_DownloadApp = () => {
<div className="h-download-app-content-box1"></div> <div className="h-download-app-content-box1"></div>
<a <a
download download
href="http://danovin.ir/app.apk" href="https://danovin.ir/app.apk"
className="h-download-app-content-box2" className="h-download-app-content-box2"
> >
<div className="h-download-app-content-box2-app-img-container"> <div className="h-download-app-content-box2-app-img-container">
@ -46,7 +46,7 @@ const H_DownloadApp = () => {
<div> <div>
<a <a
download download
href="http://danovin.ir/app.apk" href="https://danovin.ir/app.apk"
className="h-download-app-content-mobile" className="h-download-app-content-mobile"
> >
<div className="h-download-app-content-box2-app-img-container"> <div className="h-download-app-content-box2-app-img-container">

@ -16,7 +16,6 @@ export default class HomeStatic extends Component {
render() { render() {
const status = proxy.status(); const status = proxy.status();
const { data, height, title } = this.props; const { data, height, title } = this.props;
console.log(data);
return ( return (
<> <>
{window.innerWidth > 1000 ? ( {window.innerWidth > 1000 ? (

@ -42,7 +42,7 @@ class Home extends Component {
componentDidMount() { componentDidMount() {
const mobile = window.innerWidth < 1000; const mobile = window.innerWidth < 1000;
window.scrollTo(0, 0); window.scrollTo(0, 0);
console.log("xx");
// if (this.props.homeData.length == 0) { // if (this.props.homeData.length == 0) {
if (mobile && this.props.userStatus) { if (mobile && this.props.userStatus) {
this.props.getHomeData({ device: 2 }); this.props.getHomeData({ device: 2 });
@ -68,7 +68,7 @@ class Home extends Component {
<Loader /> <Loader />
</div> </div>
); );
console.log({ homeData });
return ( return (
<> <>
<> <>
@ -102,7 +102,6 @@ export default connect(
)(Home); )(Home);
const Identifier = (props) => { const Identifier = (props) => {
console.log({ item: props.item });
return ( return (
<> <>
{props.item.type === "header" ? ( {props.item.type === "header" ? (

@ -27,8 +27,6 @@ const fontSize = {
class MyBooks extends React.Component { class MyBooks extends React.Component {
componentDidMount() { componentDidMount() {
console.log(this.props);
// this.props.getList();
window.scrollTo(0, 0); window.scrollTo(0, 0);
} }

@ -21,13 +21,11 @@ const grades = [
]; ];
class Orders extends Component { class Orders extends Component {
componentDidMount() { componentDidMount() {
console.log(this.props);
if (!this.props.list) this.props.getList(); if (!this.props.list) this.props.getList();
} }
render() { render() {
// props.getList(); // props.getList();
let data = this.props.list; let data = this.props.list;
console.log(data);
return ( return (
<div className="order"> <div className="order">
<Navbar /> <Navbar />

@ -36,7 +36,6 @@ function AddToCart(props) {
sampleFileId, sampleFileId,
productType, productType,
} = props; } = props;
console.log({ info, productType });
function Navigate({ path }) { function Navigate({ path }) {
history.push(path); history.push(path);
} }
@ -140,7 +139,7 @@ function AddToCart(props) {
<div className="product-addtocart__box--accept d-flex"> <div className="product-addtocart__box--accept d-flex">
<input type="checkbox" checked={true} /> <input type="checkbox" checked={true} />
<Link <Link
to="/privacy" to="/page/privacy"
style={{ fontSize: "11px", margin: 0, padding: 0 }} style={{ fontSize: "11px", margin: 0, padding: 0 }}
> >
شرایط استفاده از دانوین و حریم خصوصی را مطالعه کرده ام شرایط استفاده از دانوین و حریم خصوصی را مطالعه کرده ام

@ -1,5 +1,5 @@
/* eslint-disable jsx-a11y/anchor-is-valid */ /* eslint-disable jsx-a11y/anchor-is-valid */
import React, { Component } from "react"; import React from "react";
import { Link, useHistory } from "react-router-dom"; import { Link, useHistory } from "react-router-dom";
import { toast } from "react-toastify"; import { toast } from "react-toastify";
import proxy from "~/Redux/proxy"; import proxy from "~/Redux/proxy";

@ -17,39 +17,23 @@ class VideoApp extends Component {
}; };
onPlayerReady(player) { onPlayerReady(player) {
// console.log("Player is ready: ", player);
this.player = player; this.player = player;
} }
onVideoPlay(duration) { onVideoPlay(duration) {}
// console.log("Video played at: ", duration);
}
onVideoPause(duration) { onVideoPause(duration) {}
// console.log("Video paused at: ", duration);
}
onVideoTimeUpdate(duration) { onVideoTimeUpdate(duration) {}
// console.log("Time updated: ", duration);
}
onVideoSeeking(duration) { onVideoSeeking(duration) {}
// console.log("Video seeking: ", duration);
}
onVideoSeeked(from, to) { onVideoSeeked(from, to) {}
// console.log(`Video seeked from ${from} to ${to}`);
}
onVideoEnd() { onVideoEnd() {}
// console.log("Video ended");
}
render() { render() {
console.log(this.state.video.poster);
return ( return (
// <div style={{ width: "100%", height: "100%" }}>
<ReactPlayer <ReactPlayer
style={{ backgroundImage: `url(${this.state.video.poster})` }} style={{ backgroundImage: `url(${this.state.video.poster})` }}
height="100%" height="100%"

@ -1,8 +1,6 @@
import React from "react"; import React from "react";
import ReactVideoJsPlayer from "./React-video-js-player/index"; import ReactVideoJsPlayer from "./React-video-js-player/index";
import PlayCircleFilledRoundedIcon from "@material-ui/icons/PlayCircleFilledRounded";
import "./index.scss"; import "./index.scss";
const maxMobileSize = 550; const maxMobileSize = 550;

@ -18,7 +18,6 @@ export default function Sample({ fileId }) {
setProgress(null); setProgress(null);
} }
const id = +window.location.pathname.split("/").slice(-1)[0]; const id = +window.location.pathname.split("/").slice(-1)[0];
console.log({ pageNumber });
return ( return (
<div className="sample" style={{ direction: "ltr" }}> <div className="sample" style={{ direction: "ltr" }}>
<Navbar page="sample" /> <Navbar page="sample" />
@ -29,17 +28,9 @@ export default function Sample({ fileId }) {
<LinearProgress variant="determinate" value={progress} /> <LinearProgress variant="determinate" value={progress} />
) : null} ) : null}
<Document <Document
// height="400"
// width="300"
className="sample_documnet" className="sample_documnet"
onLoadProgress={({ loaded, total }) => { onLoadProgress={({ loaded, total }) => {}}
console.log({ loaded, total, progress });
//setProgress((loaded / total) * 100);
}}
//file={"../8.pdf"}
//file={"https://dnvn.ir/files/sample/science/7.pdf"}
file={file(id)} file={file(id)}
cd
onLoadSuccess={onDocumentLoadSuccess} onLoadSuccess={onDocumentLoadSuccess}
> >
<Page <Page

@ -16,7 +16,7 @@ const fontSize = {
export default function Document(props) { export default function Document(props) {
const { parent, name } = props; const { parent, name } = props;
console.log({ parent, name });
return ( return (
<> <>
{window.innerWidth < 1000 ? ( {window.innerWidth < 1000 ? (

@ -79,8 +79,7 @@ class Support extends Component {
//todo redirectHome //todo redirectHome
} }
render() { render() {
let { myProductList, status } = this.props; let { status } = this.props;
console.log({ myProductList });
let opt = ["واحد مورد نظر", "واحد فروش", "واحد فنی", "واحد محتوایی"]; let opt = ["واحد مورد نظر", "واحد فروش", "واحد فنی", "واحد محتوایی"];
opt = opt.map((e) => [e, e]); opt = opt.map((e) => [e, e]);
return ( return (

@ -8979,6 +8979,15 @@ mkdirp@^1.0.3, mkdirp@^1.0.4:
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
modern-react-qr-reader@^1.0.12:
version "1.0.12"
resolved "https://registry.yarnpkg.com/modern-react-qr-reader/-/modern-react-qr-reader-1.0.12.tgz#0808ca6f168f9b39a932b8eb881e0d347746740c"
integrity sha512-PlKpqPkC1G2mHcdqK/rqCr3lejueHUqwW7NWzAqPVLcwm134P/SngpEf9u87DT7YUFogqznP1CURvovHGBXhkA==
dependencies:
jsqr "^1.2.0"
prop-types "^15.7.2"
webrtc-adapter "^7.2.1"
moment@^2.25.3, moment@^2.26.0: moment@^2.25.3, moment@^2.26.0:
version "2.29.1" version "2.29.1"
resolved "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz" resolved "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz"
@ -11027,7 +11036,7 @@ react-player@^2.9.0:
react-qr-reader@^2.2.1: react-qr-reader@^2.2.1:
version "2.2.1" version "2.2.1"
resolved "https://registry.npmjs.org/react-qr-reader/-/react-qr-reader-2.2.1.tgz" resolved "https://registry.yarnpkg.com/react-qr-reader/-/react-qr-reader-2.2.1.tgz#dc89046d1c1a1da837a683dd970de5926817d55b"
integrity sha512-EL5JEj53u2yAOgtpAKAVBzD/SiKWn0Bl7AZy6ZrSf1lub7xHwtaXe6XSx36Wbhl1VMGmvmrwYMRwO1aSCT2fwA== integrity sha512-EL5JEj53u2yAOgtpAKAVBzD/SiKWn0Bl7AZy6ZrSf1lub7xHwtaXe6XSx36Wbhl1VMGmvmrwYMRwO1aSCT2fwA==
dependencies: dependencies:
jsqr "^1.2.0" jsqr "^1.2.0"

Loading…
Cancel
Save