From fc79039af3029244e48998ad278990cb135b57bf Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Wed, 13 Jul 2022 16:46:43 +0430 Subject: [PATCH] update 11 files and delete 28 files --- .../assets/icons/ar-primary.svg | 6 +- .../assets/icons/ar-white.svg | 6 +- .../assets/icons/call-primary.svg | 6 +- .../assets/icons/call-white.svg | 6 +- .../assets/icons/check-primary.svg | 4 +- .../assets/icons/check-white.svg | 4 +- public/assets/icons/danger-primary.svg | 10 ++ public/assets/icons/danger-white.svg | 10 ++ .../assets/icons/dark-white.svg | 0 .../assets/icons/dislike-finger.svg | 0 public/assets/icons/dropdown-primary.svg | 2 +- public/assets/icons/exit-primary.svg | 6 +- public/assets/icons/exit-white.svg | 6 + .../assets/icons/faq-primary.svg | 4 +- .../assets/icons/faq-white.svg | 4 +- public/assets/icons/home-white.svg | 5 + .../assets/icons/like-finger.svg | 0 .../assets/icons}/negative.svg | 0 .../assets/icons/orders-primary.svg | 8 +- .../assets/icons/orders-white.svg | 8 +- .../assets/icons/plus-white.svg | 0 .../assets/icons}/positive.svg | 0 .../Drawer => public/assets/icons}/sun.svg | 0 src/components/Avatar/index.js | 2 +- src/components/BottomNavigation/index.js | 1 + src/components/Button/index.js | 4 - src/components/Comments/index.js | 28 ++-- src/components/Comments/user.svg | 11 -- src/components/Counter/index.js | 7 +- src/components/Design2D/index.js | 25 ++-- src/components/Drawer/home-dark.svg | 7 - src/components/Drawer/home.svg | 7 - src/components/Drawer/index.js | 126 +++++++++++------- src/components/Drawer/logout-dark.svg | 1 - src/components/Drawer/logout.svg | 1 - src/components/Drawer/mobile-basket-dark.svg | 1 - src/components/Drawer/mobile-basket.svg | 1 - src/components/Drawer/mobile-danger-dark.svg | 1 - src/components/Drawer/mobile-danger.svg | 1 - src/components/FloatingButton/index.js | 5 +- .../components/PlayList}/index.css | 0 .../components/PlayList}/index.js | 5 +- src/views/VideoDisplay/index.js | 4 +- 43 files changed, 180 insertions(+), 153 deletions(-) rename src/components/Drawer/AR-dark.svg => public/assets/icons/ar-primary.svg (83%) rename src/components/Drawer/AR.svg => public/assets/icons/ar-white.svg (69%) rename src/components/Drawer/contact-dark.svg => public/assets/icons/call-primary.svg (90%) rename src/components/Drawer/contact.svg => public/assets/icons/call-white.svg (84%) rename src/components/Drawer/activation.svg => public/assets/icons/check-primary.svg (80%) rename src/components/Drawer/activation-dark.svg => public/assets/icons/check-white.svg (73%) create mode 100644 public/assets/icons/danger-primary.svg create mode 100644 public/assets/icons/danger-white.svg rename src/components/Drawer/moon.svg => public/assets/icons/dark-white.svg (100%) rename src/components/Counter/black-dislike-icon.svg => public/assets/icons/dislike-finger.svg (100%) create mode 100644 public/assets/icons/exit-white.svg rename src/components/Drawer/faq-dark.svg => public/assets/icons/faq-primary.svg (83%) rename src/components/Drawer/faq.svg => public/assets/icons/faq-white.svg (78%) create mode 100644 public/assets/icons/home-white.svg rename src/components/Counter/black-like-icon.svg => public/assets/icons/like-finger.svg (100%) rename {src/components/Comments => public/assets/icons}/negative.svg (100%) rename src/components/Drawer/orders-dark.svg => public/assets/icons/orders-primary.svg (81%) rename src/components/Drawer/orders.svg => public/assets/icons/orders-white.svg (71%) rename src/components/FloatingButton/plus.svg => public/assets/icons/plus-white.svg (100%) rename {src/components/Comments => public/assets/icons}/positive.svg (100%) rename {src/components/Drawer => public/assets/icons}/sun.svg (100%) delete mode 100644 src/components/Comments/user.svg delete mode 100644 src/components/Drawer/home-dark.svg delete mode 100644 src/components/Drawer/home.svg delete mode 100644 src/components/Drawer/logout-dark.svg delete mode 100644 src/components/Drawer/logout.svg delete mode 100644 src/components/Drawer/mobile-basket-dark.svg delete mode 100644 src/components/Drawer/mobile-basket.svg delete mode 100644 src/components/Drawer/mobile-danger-dark.svg delete mode 100644 src/components/Drawer/mobile-danger.svg rename src/{components/CourseChapter => views/VideoDisplay/components/PlayList}/index.css (100%) rename src/{components/CourseChapter => views/VideoDisplay/components/PlayList}/index.js (98%) diff --git a/src/components/Drawer/AR-dark.svg b/public/assets/icons/ar-primary.svg similarity index 83% rename from src/components/Drawer/AR-dark.svg rename to public/assets/icons/ar-primary.svg index 7668878..b07bbcd 100644 --- a/src/components/Drawer/AR-dark.svg +++ b/public/assets/icons/ar-primary.svg @@ -1,8 +1,8 @@ - - - + + + diff --git a/src/components/Drawer/AR.svg b/public/assets/icons/ar-white.svg similarity index 69% rename from src/components/Drawer/AR.svg rename to public/assets/icons/ar-white.svg index ad01fdd..430d5b5 100644 --- a/src/components/Drawer/AR.svg +++ b/public/assets/icons/ar-white.svg @@ -1,8 +1,8 @@ - - - + + + diff --git a/src/components/Drawer/contact-dark.svg b/public/assets/icons/call-primary.svg similarity index 90% rename from src/components/Drawer/contact-dark.svg rename to public/assets/icons/call-primary.svg index 030dd7c..aa8df75 100644 --- a/src/components/Drawer/contact-dark.svg +++ b/public/assets/icons/call-primary.svg @@ -1,9 +1,9 @@ - - - + + + diff --git a/src/components/Drawer/contact.svg b/public/assets/icons/call-white.svg similarity index 84% rename from src/components/Drawer/contact.svg rename to public/assets/icons/call-white.svg index 8a1aa33..35e3ad0 100644 --- a/src/components/Drawer/contact.svg +++ b/public/assets/icons/call-white.svg @@ -1,9 +1,9 @@ - - - + + + diff --git a/src/components/Drawer/activation.svg b/public/assets/icons/check-primary.svg similarity index 80% rename from src/components/Drawer/activation.svg rename to public/assets/icons/check-primary.svg index b411bf2..62c816b 100644 --- a/src/components/Drawer/activation.svg +++ b/public/assets/icons/check-primary.svg @@ -1,6 +1,6 @@ - - + + diff --git a/src/components/Drawer/activation-dark.svg b/public/assets/icons/check-white.svg similarity index 73% rename from src/components/Drawer/activation-dark.svg rename to public/assets/icons/check-white.svg index 65cf9fa..7306ac1 100644 --- a/src/components/Drawer/activation-dark.svg +++ b/public/assets/icons/check-white.svg @@ -1,6 +1,6 @@ - - + + diff --git a/public/assets/icons/danger-primary.svg b/public/assets/icons/danger-primary.svg new file mode 100644 index 0000000..66659bf --- /dev/null +++ b/public/assets/icons/danger-primary.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/icons/danger-white.svg b/public/assets/icons/danger-white.svg new file mode 100644 index 0000000..77c8e65 --- /dev/null +++ b/public/assets/icons/danger-white.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/components/Drawer/moon.svg b/public/assets/icons/dark-white.svg similarity index 100% rename from src/components/Drawer/moon.svg rename to public/assets/icons/dark-white.svg diff --git a/src/components/Counter/black-dislike-icon.svg b/public/assets/icons/dislike-finger.svg similarity index 100% rename from src/components/Counter/black-dislike-icon.svg rename to public/assets/icons/dislike-finger.svg diff --git a/public/assets/icons/dropdown-primary.svg b/public/assets/icons/dropdown-primary.svg index dd768d9..dc10bd7 100644 --- a/public/assets/icons/dropdown-primary.svg +++ b/public/assets/icons/dropdown-primary.svg @@ -1,6 +1,6 @@ - + diff --git a/public/assets/icons/exit-primary.svg b/public/assets/icons/exit-primary.svg index 21aef1a..b94c4bc 100644 --- a/public/assets/icons/exit-primary.svg +++ b/public/assets/icons/exit-primary.svg @@ -1,6 +1,6 @@ - - - + + + diff --git a/public/assets/icons/exit-white.svg b/public/assets/icons/exit-white.svg new file mode 100644 index 0000000..de5d280 --- /dev/null +++ b/public/assets/icons/exit-white.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/Drawer/faq-dark.svg b/public/assets/icons/faq-primary.svg similarity index 83% rename from src/components/Drawer/faq-dark.svg rename to public/assets/icons/faq-primary.svg index 8d7e17d..c3866a1 100644 --- a/src/components/Drawer/faq-dark.svg +++ b/public/assets/icons/faq-primary.svg @@ -1,7 +1,7 @@ - - + + diff --git a/src/components/Drawer/faq.svg b/public/assets/icons/faq-white.svg similarity index 78% rename from src/components/Drawer/faq.svg rename to public/assets/icons/faq-white.svg index e918e6e..c1b585b 100644 --- a/src/components/Drawer/faq.svg +++ b/public/assets/icons/faq-white.svg @@ -1,7 +1,7 @@ - - + + diff --git a/public/assets/icons/home-white.svg b/public/assets/icons/home-white.svg new file mode 100644 index 0000000..0d8c282 --- /dev/null +++ b/public/assets/icons/home-white.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/Counter/black-like-icon.svg b/public/assets/icons/like-finger.svg similarity index 100% rename from src/components/Counter/black-like-icon.svg rename to public/assets/icons/like-finger.svg diff --git a/src/components/Comments/negative.svg b/public/assets/icons/negative.svg similarity index 100% rename from src/components/Comments/negative.svg rename to public/assets/icons/negative.svg diff --git a/src/components/Drawer/orders-dark.svg b/public/assets/icons/orders-primary.svg similarity index 81% rename from src/components/Drawer/orders-dark.svg rename to public/assets/icons/orders-primary.svg index f2b0817..43a23f2 100644 --- a/src/components/Drawer/orders-dark.svg +++ b/public/assets/icons/orders-primary.svg @@ -1,10 +1,10 @@ - - - + + + - + diff --git a/src/components/Drawer/orders.svg b/public/assets/icons/orders-white.svg similarity index 71% rename from src/components/Drawer/orders.svg rename to public/assets/icons/orders-white.svg index 35c2643..cd9baa3 100644 --- a/src/components/Drawer/orders.svg +++ b/public/assets/icons/orders-white.svg @@ -1,10 +1,10 @@ - - - + + + - + diff --git a/src/components/FloatingButton/plus.svg b/public/assets/icons/plus-white.svg similarity index 100% rename from src/components/FloatingButton/plus.svg rename to public/assets/icons/plus-white.svg diff --git a/src/components/Comments/positive.svg b/public/assets/icons/positive.svg similarity index 100% rename from src/components/Comments/positive.svg rename to public/assets/icons/positive.svg diff --git a/src/components/Drawer/sun.svg b/public/assets/icons/sun.svg similarity index 100% rename from src/components/Drawer/sun.svg rename to public/assets/icons/sun.svg diff --git a/src/components/Avatar/index.js b/src/components/Avatar/index.js index 58c5c57..43f82c1 100644 --- a/src/components/Avatar/index.js +++ b/src/components/Avatar/index.js @@ -3,7 +3,7 @@ import React from "react"; function Avatar({ source, size = 20, status }) { return (
{ ); }; + const pages = React.useMemo(() => { return [ { diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 6d7b456..74ad943 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -38,7 +38,3 @@ export default function Button({ ); } - -Button.defaultProps = { - color: "", -}; diff --git a/src/components/Comments/index.js b/src/components/Comments/index.js index 4326ce0..12ce066 100644 --- a/src/components/Comments/index.js +++ b/src/components/Comments/index.js @@ -1,11 +1,10 @@ import React, { useMemo, useEffect, useState } from "react"; import { connect } from "react-redux"; -import userImage from "./user.svg"; -import positiveIcon from "./positive.svg"; -import negativeIcon from "./negative.svg"; -import Avatar from "../Avatar"; import moment from "jalali-moment"; + +//components import StarRating from "../StarRating"; +import Avatar from "../Avatar"; export const Comments = ({ comments, indent }) => { const [list, setList] = useState([]); @@ -76,17 +75,24 @@ export const Comments = ({ comments, indent }) => {
 
- {comment?.status === true && ( + {comment?.status ? ( <> - + {window.t("برای خرید توصیه می‌کنم")} - )} - {comment?.status === false && ( + ) : ( <> - + {window.t("بازگشت بی چون و برای خرید توصیه نمی‌کنم")} @@ -102,13 +108,13 @@ export const Comments = ({ comments, indent }) => {
- {indent && ( + {indent ? (
{comment?.childs?.map((object, index) => ( ))}
- )} + ) : null} ); }; diff --git a/src/components/Comments/user.svg b/src/components/Comments/user.svg deleted file mode 100644 index e8d43cf..0000000 --- a/src/components/Comments/user.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/components/Counter/index.js b/src/components/Counter/index.js index a892176..9cf583b 100644 --- a/src/components/Counter/index.js +++ b/src/components/Counter/index.js @@ -1,8 +1,5 @@ import React, { useState } from "react"; -import blackDisLikeIcon from "./black-dislike-icon.svg"; -import blackLikeIcon from "./black-like-icon.svg"; - const Counter = ({ incrementIcon, decrementIcon, flex, value }) => { const [count, setCount] = useState(value); @@ -33,8 +30,8 @@ const Counter = ({ incrementIcon, decrementIcon, flex, value }) => { export default Counter; Counter.defaultProps = { - incrementIcon: blackLikeIcon, - decrementIcon: blackDisLikeIcon, + incrementIcon: '/assets/icons/like-finger.svg', + decrementIcon: '/assets/icons/dislike-finger.svg', flex: "flex-col", value: 0 }; diff --git a/src/components/Design2D/index.js b/src/components/Design2D/index.js index 00333a5..8146d20 100644 --- a/src/components/Design2D/index.js +++ b/src/components/Design2D/index.js @@ -2,18 +2,19 @@ import React from "react"; const Design2D = ({ array }) => { return ( -
{array.map((item, index) => (
@@ -23,13 +24,14 @@ const Design2D = ({ array }) => { style={{ flex: item1.flex }} key={index} > -
{/*

inside div

*/} {/* - - - - - - diff --git a/src/components/Drawer/home.svg b/src/components/Drawer/home.svg deleted file mode 100644 index e671e48..0000000 --- a/src/components/Drawer/home.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/components/Drawer/index.js b/src/components/Drawer/index.js index 2a56294..4df1d80 100644 --- a/src/components/Drawer/index.js +++ b/src/components/Drawer/index.js @@ -2,34 +2,10 @@ import React, { useState } from "react"; import { connect } from "react-redux"; import { publicApi, dialog, user } from "../../redux/actions"; import { Link } from "react-router-dom"; -import Drawer from "react-modern-drawer"; - -//assets -import homeIcon from "./home.svg"; -import homeDarkIcon from "./home-dark.svg"; -import logoutIcon from "./logout.svg"; -import logoutDarkIcon from "./logout-dark.svg"; -import dangerIcon from "./mobile-danger.svg"; -// import dangerDarkIcon from "./mobile-danger-dark.svg"; -import activationIcon from "./activation.svg"; -import activationDarkIcon from "./activation-dark.svg"; -import contactIcon from "./contact.svg"; -import contactDarkIcon from "./contact-dark.svg"; -import ordersIcon from "./orders.svg"; -import ordersDarkIcon from "./orders-dark.svg"; -import arIcon from "./AR.svg"; -import arDarkIcon from "./AR-dark.svg"; -import cartIcon from "./mobile-basket.svg"; -import cartDarkIcon from "./mobile-basket-dark.svg"; -import faqIcon from "./faq.svg"; -import faqDarkIcon from "./faq-dark.svg"; - -// import arrowLeftVideo from "../../assets/icons/dropdown-white.svg"; -import sunIcon from "./sun.svg"; -import moonIcon from "./moon.svg"; //components import Avatar from "../../components/Avatar"; +import Drawer from "react-modern-drawer"; const MyDrawer = ({ setDrawerOpen, @@ -49,8 +25,12 @@ const MyDrawer = ({ link: "/", icon: ( {window.t("صفحه ), @@ -65,8 +45,12 @@ const MyDrawer = ({ link: "/cart", icon: ( {window.t("سبد ), @@ -81,8 +65,12 @@ const MyDrawer = ({ link: "/activation", icon: ( {window.t("فعال ), @@ -97,8 +85,12 @@ const MyDrawer = ({ link: "/ar", icon: ( {window.t("واقعیت ), @@ -113,8 +105,12 @@ const MyDrawer = ({ link: "/orders", icon: ( {window.t("سفارشات")} ), @@ -129,8 +125,12 @@ const MyDrawer = ({ link: "/faq", icon: ( {window.t("سوالات ), @@ -145,8 +145,12 @@ const MyDrawer = ({ link: "/contact", icon: ( {window.t("پشتیبانی")} ), @@ -161,8 +165,12 @@ const MyDrawer = ({ link: "/", icon: ( {window.t("خروج ), @@ -181,7 +189,7 @@ const MyDrawer = ({ }, }, ]; - },[isDark, user]); + }, [isDark, user]); const publicLink = React.useMemo(() => { return [ @@ -190,8 +198,12 @@ const MyDrawer = ({ link: "/", icon: ( {window.t("صفحه ), @@ -203,8 +215,12 @@ const MyDrawer = ({ link: "/signup", icon: ( {window.t("کتاب‌های ), @@ -216,8 +232,12 @@ const MyDrawer = ({ link: "/contact-us", icon: ( {window.t("پشتیبانی")} ), @@ -225,7 +245,7 @@ const MyDrawer = ({ message: "", }, ]; - },[isDark, user]); + }, [isDark, user]); return ( changeDarkMode(!isDark)} @@ -282,7 +306,7 @@ const MyDrawer = ({ item.onClick()}>
{item.icon} -
+
{item.name}
{item.message &&
{item.message}
} diff --git a/src/components/Drawer/logout-dark.svg b/src/components/Drawer/logout-dark.svg deleted file mode 100644 index a7e0758..0000000 --- a/src/components/Drawer/logout-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/Drawer/logout.svg b/src/components/Drawer/logout.svg deleted file mode 100644 index 04d6d86..0000000 --- a/src/components/Drawer/logout.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/Drawer/mobile-basket-dark.svg b/src/components/Drawer/mobile-basket-dark.svg deleted file mode 100644 index 1968e06..0000000 --- a/src/components/Drawer/mobile-basket-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/Drawer/mobile-basket.svg b/src/components/Drawer/mobile-basket.svg deleted file mode 100644 index eafad9f..0000000 --- a/src/components/Drawer/mobile-basket.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/Drawer/mobile-danger-dark.svg b/src/components/Drawer/mobile-danger-dark.svg deleted file mode 100644 index e60b26e..0000000 --- a/src/components/Drawer/mobile-danger-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/Drawer/mobile-danger.svg b/src/components/Drawer/mobile-danger.svg deleted file mode 100644 index 9cc5e0e..0000000 --- a/src/components/Drawer/mobile-danger.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/FloatingButton/index.js b/src/components/FloatingButton/index.js index 97d6689..8b3b410 100644 --- a/src/components/FloatingButton/index.js +++ b/src/components/FloatingButton/index.js @@ -1,9 +1,6 @@ import React from "react"; import { connect } from "react-redux"; -//assets -import plusIcon from "./plus.svg"; - export const FloatingButton = ({ action, position, icon, size }) => { return (