update 23 files

master
Reza_ashrafi 3 years ago
parent 37efeaf529
commit 717023a7c3
  1. 1
      package.json
  2. 46
      src/components/Navbar.js
  3. 1
      src/screens/AR/index.js
  4. 4
      src/screens/Activation/index.js
  5. 4
      src/screens/Address/index.js
  6. 27
      src/screens/Blog/index.js
  7. 5
      src/screens/Blogs/index.js
  8. 3
      src/screens/Contact/index.js
  9. 4
      src/screens/DeliveryForm/index.js
  10. 6
      src/screens/Faq/index.js
  11. 3
      src/screens/Home/index.js
  12. 3
      src/screens/OrderDetails/index.js
  13. 3
      src/screens/OrdersFollowUp/index.js
  14. 8
      src/screens/Product/components/Rates.js
  15. 3
      src/screens/Product/index.js
  16. 2
      src/screens/Products/components/Header.js
  17. 3
      src/screens/Profile/index.js
  18. 2
      src/screens/QRContent/index.js
  19. 3
      src/screens/ShoppingCart/index.js
  20. 3
      src/screens/Video/index.js
  21. 3
      src/screens/VideoDisplay/index.js
  22. 3
      src/screens/Videos/index.js
  23. 15
      yarn.lock

@ -42,6 +42,7 @@
"react-i18next": "^11.15.1",
"react-native": "0.64.3",
"react-native-awesome-alerts": "^1.5.2",
"react-native-copilot": "^2.5.1",
"react-native-htmlview": "^0.16.0",
"react-native-openanything": "^0.0.6",
"react-native-qrcode-scanner": "^1.5.4",

@ -7,6 +7,7 @@ import {
TouchableOpacity,
ActivityIndicator,
} from "react-native";
import { copilot, walkthroughable, CopilotStep } from "react-native-copilot";
import Svg, {
G,
@ -33,6 +34,8 @@ import Colors from "../constants/Colors";
import tw from "tailwind-rn";
import fontSize from "../constants/fontSize";
const CopilotView = walkthroughable(View);
const Navbar = ({
notification,
setBoxPosition,
@ -42,9 +45,16 @@ const Navbar = ({
userFavoriteList,
theme,
bookmarkLoading,
...props
}) => {
const navigation = useNavigation();
React.useEffect(() => {
setTimeout(() => {
props.start();
}, 800);
}, []);
const isActiveBookmark = React.useMemo(() => {
return userFavoriteList.filter((object) =>
headerOptions.bookmarkItem?.productId
@ -64,7 +74,6 @@ const Navbar = ({
borderColor:
theme === "light" ? Colors.theme1.green79 : Colors.theme1.white,
borderWidth: 1,
marginLeft: route === "AR" ? 10 : 0,
},
]}
onPress={() => navigation.navigate(route, { page: state })}
@ -86,6 +95,7 @@ const Navbar = ({
? Colors.theme1.white
: Colors.theme1.dark,
height: 64,
zIndex: 100,
},
]}
>
@ -414,9 +424,19 @@ const Navbar = ({
) : null}
{headerOptions?.qr ? (
<>
<CopilotStep
text="This is a hello world example!"
order={1}
name="hello"
>
<CopilotView>
<Button
icon={
<Svg xmlns="http://www.w3.org/2000/svg" width={30} height={30}>
<Svg
xmlns="http://www.w3.org/2000/svg"
width={30}
height={30}
>
<G
fill={
theme === "light"
@ -598,6 +618,15 @@ const Navbar = ({
route={"QR"}
state={"book"}
/>
</CopilotView>
</CopilotStep>
<View style={{ marginHorizontal: 5 }}></View>
<CopilotStep
text="This is a hello world example!!"
order={2}
name="helloo"
>
<CopilotView>
<Button
icon={
<Svg
@ -644,6 +673,8 @@ const Navbar = ({
route={"AR"}
state={"AR"}
/>
</CopilotView>
</CopilotStep>
</>
) : null}
{headerOptions?.bookmark ? (
@ -723,4 +754,13 @@ const mapDispatchToProps = {
deleteBookmark: userFavorite.del,
};
export default connect(mapStateToProps, mapDispatchToProps)(Navbar);
const component = copilot({
labels: {
previous: "قبلی",
next: "بعدی",
skip: "رد کردن",
finish: "پایان",
},
})(Navbar);
export default connect(mapStateToProps, mapDispatchToProps)(component);

@ -72,6 +72,7 @@ function AR({ getUserProducts, userProducts, mobile, theme }) {
style={{
paddingHorizontal: 16,
height: height,
paddingTop: 64
}}
contentContainerStyle={{ paddingBottom: 100 }}
>

@ -51,7 +51,7 @@ function Activation({ add, mobile, theme, route, orientation }) {
<SafeAreaView
style={[{ paddingTop: ios ? 0 : StatusBar.currentHeight, flex: 1 }]}
>
<ScrollView style={tw("flex-1")}>
<ScrollView style={[tw("flex-1")]}>
<KeyboardAvoidingView
behavior={"padding"}
style={{
@ -73,7 +73,7 @@ function Activation({ add, mobile, theme, route, orientation }) {
backgroundColor: Colors.theme1.greenCF + "0F",
}}
/>
<View style={tw("flex w-full")}>
<View style={[tw("flex w-full"), { paddingTop: 64 }]}>
<TopHeader
background={bgQr}
title={"فعالسازی کتاب دیجیتال"}

@ -148,7 +148,7 @@ const Address = ({
provinceId,
cityId,
postalCode,
id
id,
} = addressFields;
if (!firstName) {
@ -392,7 +392,7 @@ const Address = ({
back: true,
}}
/>
<ScrollView style={tw("flex-1 px-4")}>
<ScrollView style={[tw("flex-1 px-4"), { paddingTop: 64 }]}>
<KeyboardAvoidingView>
<TouchableWithoutFeedback>
<View style={tw("flex-1")}>

@ -137,8 +137,8 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
</View>
</View>
<View style="flex justify-center items-end">
{
blog?.duration ? <Text
{blog?.duration ? (
<Text
style={{
fontFamily: "regular",
color: Colors.theme1.white,
@ -147,8 +147,8 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
}}
>
{"زمان مطالعه" + " " + blog?.duration + " دقیقه"}
</Text> : null
}
</Text>
) : null}
<Text
style={{
@ -158,9 +158,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
textAlign: ios ? "left" : "left",
}}
>
{
moment(blog?.createdAt).format('jYYYY/jMM/jDD')
}
{moment(blog?.createdAt).format("jYYYY/jMM/jDD")}
</Text>
</View>
</View>
@ -195,7 +193,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
value={blog?.text}
renderNode={renderNode}
stylesheet={{
h1 : {
h1: {
color:
theme === "light"
? Colors.theme1.gray20
@ -207,7 +205,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
marginVertical: -15,
paddingTop: 5,
},
h2 : {
h2: {
color:
theme === "light"
? Colors.theme1.gray20
@ -218,7 +216,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
fontSize: fontSize.xl,
marginVertical: -10,
},
h3 : {
h3: {
color:
theme === "light"
? Colors.theme1.gray20
@ -261,9 +259,9 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
fontFamily: "light",
lineHeight: 25,
},
span : {
color : 'red'
}
span: {
color: "red",
},
}}
/>
</View>
@ -307,7 +305,8 @@ const styles = StyleSheet.create({
paddingBottom: 40,
},
container: {
paddingVertical: 0,
paddingTop: 64,
paddingBottom: 0,
paddingHorizontal: 0,
},
font: {

@ -78,7 +78,7 @@ function Blogs({ getList, blogs, hashtag, setHashtag, theme }) {
{hashtag ? (
<FlatList
contentContainerStyle={styles.contentContainerStyle}
style={tw("px-4")}
style={[tw("px-4"), { paddingTop: 64 }]}
data={blogs?.filter((blog) => blog?.tag === hashtag)}
renderItem={({ item }) => (
<HashtagBlog blog={item} blogsPage={true} theme={theme} />
@ -169,7 +169,8 @@ const styles = StyleSheet.create({
paddingTop: 0,
},
container: {
paddingVertical: 0,
paddingBottom: 0,
paddingTop: 64,
paddingHorizontal: 0,
},
});

@ -106,12 +106,13 @@ function Contact({ theme }) {
backgroundColor: Colors.theme1.greenCF + "0F",
}}
/>
<ScrollView style={[tw("flex pb-20 px-4 mb-4"), { paddingTop: 64 }]}>
<Header
background={bgContact}
title={"ارتباط با ما"}
description={"تیم پشتیبانی ما اینجاست تا شما رو کمک کنه"}
/>
<ScrollView style={[tw("flex pb-20 px-4 mb-4")]}>
{Object.keys(info).map((item, index) => (
<Box info={info[item]} key={index} />
))}

@ -113,7 +113,9 @@ const styles = StyleSheet.create({
paddingBottom: 100,
},
container: {
paddingVertical: 5,
paddingBottom: 5,
paddingTop: 64
},
});

@ -67,6 +67,7 @@ function Faq({
backgroundColor: Colors.theme1.greenCF + "0F",
}}
/>
<View style={{ paddingTop: 64 }}>
<Header
background={bgFaq}
title={"پرسشهای متداول"}
@ -83,7 +84,7 @@ function Faq({
{search?.length ? (
searchResult?.length ? (
<FlatList
contentContainerStyle={{ paddingBottom: height / 2 }}
contentContainerStyle={{ paddingBottom: height }}
style={[tw("flex px-4 mb-4")]}
data={searchResult}
keyExtractor={(item, index) => {
@ -106,7 +107,7 @@ function Faq({
)
) : (
<FlatList
contentContainerStyle={{ paddingBottom: height / 2 }}
contentContainerStyle={{ paddingBottom: height }}
style={[tw("flex px-4 mb-4")]}
data={list}
keyExtractor={(item, index) => {
@ -118,6 +119,7 @@ function Faq({
initialNumToRender={10}
/>
)}
</View>
</SafeAreaView>
) : null;
}

@ -107,7 +107,8 @@ const styles = StyleSheet.create({
},
container: {
flexDirection: "column",
paddingVertical: 0,
paddingBottom: 0,
paddingTop: 64,
paddingHorizontal: 0,
},
});

@ -491,8 +491,9 @@ const styles = StyleSheet.create({
},
container: {
flexDirection: "column",
paddingVertical: 0,
paddingBottom: 0,
paddingHorizontal: 16,
paddingTop: 64,
},
});

@ -89,7 +89,8 @@ const styles = StyleSheet.create({
},
container: {
flexDirection: "column",
paddingVertical: 0,
paddingBottom: 0,
paddingTop: 64,
paddingHorizontal: 16,
},
});

@ -17,13 +17,7 @@ function Rates({ rate, productId, addVote, isBuyed = null, theme }) {
<View style={tw("flex flex-row-reverse")}>
<Pressable
style={[tw("flex items-center justify-center"), { width: "25%" }]}
onPress={() =>
!isBuyed
? asyncAwesomeAlert("خطا", "شما این محصول رو خریداری نکرده اید.", {
showCancelButton: false,
})
: {}
}
onPress={() => {}}
>
<Text
style={[

@ -57,7 +57,8 @@ const styles = StyleSheet.create({
},
container: {
flexDirection: "column",
paddingVertical: 5,
paddingBottom: 5,
paddingTop: 64,
paddingHorizontal: 16,
},
});

@ -12,7 +12,7 @@ import Select from "../../../components/Select";
const Header = ({ setFilterOptions, filterOptions, levels, productTypes }) => {
return (
<View style={tw("flex px-4 h-32")}>
<View style={tw("flex mt-14 px-4 h-32")}>
<Search
onChange={(val) => setFilterOptions({ ...filterOptions, search: val })}
placeholder={"نام کتاب یا دوره را جستجو کنید"}

@ -149,7 +149,8 @@ const styles = StyleSheet.create({
},
container: {
flexDirection: "column",
paddingVertical: 5,
paddingBottom: 5,
paddingTop: 64,
paddingHorizontal: 16,
},
});

@ -40,6 +40,8 @@ function QRContent({ route, getQrData, data, grades, theme }) {
}}
/>
<ScrollView
style={tw('pt-14')}
>
{data ? <Content data={data} grades={grades} theme={theme} /> : null}
</ScrollView>

@ -340,7 +340,8 @@ const styles = StyleSheet.create({
},
container: {
flexDirection: "column",
paddingVertical: 5,
paddingBottom: 5,
paddingTop: 64,
paddingHorizontal: 16,
},
});

@ -220,7 +220,8 @@ const styles = StyleSheet.create({
paddingBottom: 100,
},
container: {
paddingVertical: 5,
paddingBottom: 5,
paddingTop: 64,
paddingHorizontal: 16,
},
});

@ -129,7 +129,8 @@ const styles = StyleSheet.create({
paddingBottom: 100,
},
container: {
paddingVertical: 5,
paddingBottom: 5,
paddingTop: 64,
paddingHorizontal: 16,
},
});

@ -92,7 +92,8 @@ const styles = StyleSheet.create({
},
container: {
flexDirection: "column",
paddingVertical: 0,
paddingBottom: 0,
paddingTop: 64,
paddingHorizontal: 16,
},
});

@ -3624,7 +3624,7 @@ hermes-profile-transformer@^0.0.6:
dependencies:
source-map "^0.7.3"
hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
hoist-non-react-statics@^3.0.1, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
@ -4905,6 +4905,11 @@ minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
mitt@^1.1.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.2.0.tgz#cb24e6569c806e31bd4e3995787fe38a04fdf90d"
integrity sha512-r6lj77KlwqLhIUku9UWYes7KJtsczvolZkzp8hbaDPPaE24OmWl5s539Mytlj22siEQKosZ26qCBgda2PKwoJw==
mixin-deep@^1.2.0:
version "1.3.2"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
@ -5548,6 +5553,14 @@ react-native-codegen@^0.0.6:
jscodeshift "^0.11.0"
nullthrows "^1.1.1"
react-native-copilot@^2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/react-native-copilot/-/react-native-copilot-2.5.1.tgz#1ef174fedb422b3981ee440970d34a733e35845b"
integrity sha512-THo7rFV35Ffnwz+2vS01H8PXUXc5IAk+CLD5Rd3kWTNla+cBww8hhxKxJc8pJF7xj+o8NZqCDPy+R6LjtFuBLQ==
dependencies:
hoist-non-react-statics "^3.0.1"
mitt "^1.1.3"
react-native-htmlview@^0.16.0:
version "0.16.0"
resolved "https://registry.yarnpkg.com/react-native-htmlview/-/react-native-htmlview-0.16.0.tgz#4a70d7c02ab3ab18e1cb708c0dcf0d99bc6c1cdc"

Loading…
Cancel
Save