update 23 files

master
Reza_ashrafi 2 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. 19
      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-i18next": "^11.15.1",
"react-native": "0.64.3", "react-native": "0.64.3",
"react-native-awesome-alerts": "^1.5.2", "react-native-awesome-alerts": "^1.5.2",
"react-native-copilot": "^2.5.1",
"react-native-htmlview": "^0.16.0", "react-native-htmlview": "^0.16.0",
"react-native-openanything": "^0.0.6", "react-native-openanything": "^0.0.6",
"react-native-qrcode-scanner": "^1.5.4", "react-native-qrcode-scanner": "^1.5.4",

@ -7,6 +7,7 @@ import {
TouchableOpacity, TouchableOpacity,
ActivityIndicator, ActivityIndicator,
} from "react-native"; } from "react-native";
import { copilot, walkthroughable, CopilotStep } from "react-native-copilot";
import Svg, { import Svg, {
G, G,
@ -33,6 +34,8 @@ import Colors from "../constants/Colors";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from "../constants/fontSize"; import fontSize from "../constants/fontSize";
const CopilotView = walkthroughable(View);
const Navbar = ({ const Navbar = ({
notification, notification,
setBoxPosition, setBoxPosition,
@ -42,9 +45,16 @@ const Navbar = ({
userFavoriteList, userFavoriteList,
theme, theme,
bookmarkLoading, bookmarkLoading,
...props
}) => { }) => {
const navigation = useNavigation(); const navigation = useNavigation();
React.useEffect(() => {
setTimeout(() => {
props.start();
}, 800);
}, []);
const isActiveBookmark = React.useMemo(() => { const isActiveBookmark = React.useMemo(() => {
return userFavoriteList.filter((object) => return userFavoriteList.filter((object) =>
headerOptions.bookmarkItem?.productId headerOptions.bookmarkItem?.productId
@ -64,7 +74,6 @@ const Navbar = ({
borderColor: borderColor:
theme === "light" ? Colors.theme1.green79 : Colors.theme1.white, theme === "light" ? Colors.theme1.green79 : Colors.theme1.white,
borderWidth: 1, borderWidth: 1,
marginLeft: route === "AR" ? 10 : 0,
}, },
]} ]}
onPress={() => navigation.navigate(route, { page: state })} onPress={() => navigation.navigate(route, { page: state })}
@ -86,6 +95,7 @@ const Navbar = ({
? Colors.theme1.white ? Colors.theme1.white
: Colors.theme1.dark, : Colors.theme1.dark,
height: 64, height: 64,
zIndex: 100,
}, },
]} ]}
> >
@ -414,9 +424,19 @@ const Navbar = ({
) : null} ) : null}
{headerOptions?.qr ? ( {headerOptions?.qr ? (
<> <>
<CopilotStep
text="This is a hello world example!"
order={1}
name="hello"
>
<CopilotView>
<Button <Button
icon={ 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 <G
fill={ fill={
theme === "light" theme === "light"
@ -598,6 +618,15 @@ const Navbar = ({
route={"QR"} route={"QR"}
state={"book"} state={"book"}
/> />
</CopilotView>
</CopilotStep>
<View style={{ marginHorizontal: 5 }}></View>
<CopilotStep
text="This is a hello world example!!"
order={2}
name="helloo"
>
<CopilotView>
<Button <Button
icon={ icon={
<Svg <Svg
@ -644,6 +673,8 @@ const Navbar = ({
route={"AR"} route={"AR"}
state={"AR"} state={"AR"}
/> />
</CopilotView>
</CopilotStep>
</> </>
) : null} ) : null}
{headerOptions?.bookmark ? ( {headerOptions?.bookmark ? (
@ -723,4 +754,13 @@ const mapDispatchToProps = {
deleteBookmark: userFavorite.del, 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={{ style={{
paddingHorizontal: 16, paddingHorizontal: 16,
height: height, height: height,
paddingTop: 64
}} }}
contentContainerStyle={{ paddingBottom: 100 }} contentContainerStyle={{ paddingBottom: 100 }}
> >

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

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

@ -137,8 +137,8 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
</View> </View>
</View> </View>
<View style="flex justify-center items-end"> <View style="flex justify-center items-end">
{ {blog?.duration ? (
blog?.duration ? <Text <Text
style={{ style={{
fontFamily: "regular", fontFamily: "regular",
color: Colors.theme1.white, color: Colors.theme1.white,
@ -147,8 +147,8 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
}} }}
> >
{"زمان مطالعه" + " " + blog?.duration + " دقیقه"} {"زمان مطالعه" + " " + blog?.duration + " دقیقه"}
</Text> : null </Text>
} ) : null}
<Text <Text
style={{ style={{
@ -158,9 +158,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
textAlign: ios ? "left" : "left", textAlign: ios ? "left" : "left",
}} }}
> >
{ {moment(blog?.createdAt).format("jYYYY/jMM/jDD")}
moment(blog?.createdAt).format('jYYYY/jMM/jDD')
}
</Text> </Text>
</View> </View>
</View> </View>
@ -262,8 +260,8 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
lineHeight: 25, lineHeight: 25,
}, },
span: { span: {
color : 'red' color: "red",
} },
}} }}
/> />
</View> </View>
@ -307,7 +305,8 @@ const styles = StyleSheet.create({
paddingBottom: 40, paddingBottom: 40,
}, },
container: { container: {
paddingVertical: 0, paddingTop: 64,
paddingBottom: 0,
paddingHorizontal: 0, paddingHorizontal: 0,
}, },
font: { font: {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -3624,7 +3624,7 @@ hermes-profile-transformer@^0.0.6:
dependencies: dependencies:
source-map "^0.7.3" 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" version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== 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" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== 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: mixin-deep@^1.2.0:
version "1.3.2" version "1.3.2"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" 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" jscodeshift "^0.11.0"
nullthrows "^1.1.1" 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: react-native-htmlview@^0.16.0:
version "0.16.0" version "0.16.0"
resolved "https://registry.yarnpkg.com/react-native-htmlview/-/react-native-htmlview-0.16.0.tgz#4a70d7c02ab3ab18e1cb708c0dcf0d99bc6c1cdc" resolved "https://registry.yarnpkg.com/react-native-htmlview/-/react-native-htmlview-0.16.0.tgz#4a70d7c02ab3ab18e1cb708c0dcf0d99bc6c1cdc"

Loading…
Cancel
Save