reza added some change

master
Reza_ashrafi 3 years ago
parent ed0b096959
commit 73bb287197
  1. 4
      navigation/index.js
  2. 2
      package.json
  3. 13
      src/components/BottomSheet.js
  4. 110
      src/components/BottomSheetComponents/ProductQuestion.js
  5. 110
      src/components/BottomSheetComponents/ProductReview.js
  6. 110
      src/components/BottomSheetComponents/ProductSpecifications.js
  7. 3
      src/components/Drawer.js
  8. 12
      src/components/Pressable.js
  9. 40
      src/screens/Activation/index.js
  10. 6
      src/screens/Contact/Box.js
  11. 10
      src/screens/Home/components/Header.js
  12. 61
      src/screens/Product/components/Book.js
  13. 68
      src/screens/Product/components/LinkBox.js
  14. 2
      src/screens/QR/Scan/index.js
  15. 2
      src/screens/QRContent/index.js
  16. 15
      src/screens/ShoppingCart/index.js
  17. 3
      src/screens/Splash/index.js
  18. 38
      src/screens/Tests/index.js
  19. 41
      src/screens/Video/components/Season.js
  20. 12
      src/screens/Video/index.js
  21. 41
      src/screens/VideoDisplay/components/Season/index.js
  22. 2
      src/screens/Videos/components/NewestVideo.js
  23. 18
      yarn.lock

@ -102,6 +102,8 @@ const BottomTabNavigator = () => {
name="VODTab" name="VODTab"
component={VODStackScreen} component={VODStackScreen}
options={{ options={{
unmountOnExit : true,
unmountOnBlur : true,
title : "ویدئوها", title : "ویدئوها",
tabBarIcon: ({ focused, color }) => tabBarIcon: ({ focused, color }) =>
focused ? ( focused ? (
@ -185,7 +187,7 @@ const VODStackScreen = () => {
return ( return (
<VODStack.Navigator screenOptions={{ headerShown: false }}> <VODStack.Navigator screenOptions={{ headerShown: false }}>
<VODStack.Screen name="VOD" component={Videos} /> <VODStack.Screen name="VOD" component={Videos} />
<VODStack.Screen name="Video" component={Video} /> <VODStack.Screen name="Video" component={Video} unmountOnExit={true} />
<VODStack.Screen name="VideoDisplay" component={VideoDisplay} /> <VODStack.Screen name="VideoDisplay" component={VideoDisplay} />
</VODStack.Navigator> </VODStack.Navigator>
); );

@ -37,11 +37,13 @@
"react-native-awesome-alerts": "^1.5.2", "react-native-awesome-alerts": "^1.5.2",
"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",
"react-native-raw-bottom-sheet": "^2.2.0",
"react-native-restart": "^0.0.22", "react-native-restart": "^0.0.22",
"react-native-safe-area-context": "3.3.2", "react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1", "react-native-screens": "~3.10.1",
"react-native-select-dropdown": "^1.6.0", "react-native-select-dropdown": "^1.6.0",
"react-native-web": "0.17.1", "react-native-web": "0.17.1",
"react-navigation-stack": "^2.10.4",
"react-redux": "^7.2.6", "react-redux": "^7.2.6",
"redux": "^4.1.2", "redux": "^4.1.2",
"redux-logger": "^3.0.6", "redux-logger": "^3.0.6",

@ -0,0 +1,13 @@
import { View, Text } from 'react-native';
import React from 'react';
const BottomSheet = () => {
return (
<View>
<Text></Text>
</View>
);
};
export default BottomSheet;

@ -0,0 +1,110 @@
import { View, Text, ScrollView, Dimensions } from "react-native";
import React from "react";
import fontSize from "../../constants/fontSize";
import tw from "tailwind-rn";
const { width } = Dimensions.get("window");
const ProductQuestion = ({ list }) => {
const Property = ({ prop }) => {
return (
<View style={[tw("flex flex-row-reverse mb-3")]}>
<View
style={[
tw("rounded-md rounded-md"),
{ backgroundColor: "#f8f8f8", width: width / 3.5 },
]}
>
<Text
style={[
tw("py-3 pr-2"),
{
fontFamily: "regular",
fontSize: fontSize.base,
color: "#07AFAF",
},
]}
>
{persian[prop]}
</Text>
</View>
<View
style={[
tw("flex-1 mr-2 rounded-md px-2 py-3"),
{ backgroundColor: "#f8f8f8" },
]}
>
<Text
style={[
tw("text-right"),
{
fontFamily: "regular",
fontSize: fontSize.sm,
color: "#646464",
},
]}
>
{list[prop]}
</Text>
</View>
</View>
);
};
return (
<View style={{ flex: 1, paddingHorizontal: 16 }}>
<View
onPress={() => refRBSheet.current.open()}
style={[
tw(
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4"
),
{
backgroundColor: "#50A9FF33",
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
},
]}
>
مشخصات محصول
</Text>
</View>
<ScrollView style={tw("flex-1")}>
{Object?.keys(list)?.map((prop, index) => (
<Property prop={prop} key={index} />
))}
</ScrollView>
</View>
);
};
export default ProductQuestion;
ProductQuestion.defaultProps = {
list: {
display: "IPS LCD 4K Samsung backlight",
weight: "2 کیلوگرم",
proccessor: "Intel core I7 11700H",
graphic: "Nvidia 3090TI 6GB",
audio: "Sonic master",
keyboard: "جزیره ای",
accessories: "کیف + کابل تبدیل برق شهری",
},
};
const persian = {
display: "صفحه نمایش",
weight: "وزن",
proccessor: "پردازنده",
graphic: "پردازنده گرافیکی",
audio: "کارت صدا",
keyboard: "کیبرد",
accessories: "متعلقات جعبه",
};

@ -0,0 +1,110 @@
import { View, Text, ScrollView, Dimensions } from "react-native";
import React from "react";
import fontSize from "../../constants/fontSize";
import tw from "tailwind-rn";
const { width } = Dimensions.get("window");
const ProductReviews = ({ list }) => {
const Property = ({ prop }) => {
return (
<View style={[tw("flex flex-row-reverse mb-3")]}>
<View
style={[
tw("rounded-md rounded-md"),
{ backgroundColor: "#f8f8f8", width: width / 3.5 },
]}
>
<Text
style={[
tw("py-3 pr-2"),
{
fontFamily: "regular",
fontSize: fontSize.base,
color: "#07AFAF",
},
]}
>
{persian[prop]}
</Text>
</View>
<View
style={[
tw("flex-1 mr-2 rounded-md px-2 py-3"),
{ backgroundColor: "#f8f8f8" },
]}
>
<Text
style={[
tw("text-right"),
{
fontFamily: "regular",
fontSize: fontSize.sm,
color: "#646464",
},
]}
>
{list[prop]}
</Text>
</View>
</View>
);
};
return (
<View style={{ flex: 1, paddingHorizontal: 16 }}>
<View
onPress={() => refRBSheet.current.open()}
style={[
tw(
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4"
),
{
backgroundColor: "#50A9FF33",
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
},
]}
>
مشخصات محصول
</Text>
</View>
<ScrollView style={tw("flex-1")}>
{Object?.keys(list)?.map((prop, index) => (
<Property prop={prop} key={index} />
))}
</ScrollView>
</View>
);
};
export default ProductReviews;
ProductReviews.defaultProps = {
list: {
display: "IPS LCD 4K Samsung backlight",
weight: "2 کیلوگرم",
proccessor: "Intel core I7 11700H",
graphic: "Nvidia 3090TI 6GB",
audio: "Sonic master",
keyboard: "جزیره ای",
accessories: "کیف + کابل تبدیل برق شهری",
},
};
const persian = {
display: "صفحه نمایش",
weight: "وزن",
proccessor: "پردازنده",
graphic: "پردازنده گرافیکی",
audio: "کارت صدا",
keyboard: "کیبرد",
accessories: "متعلقات جعبه",
};

@ -0,0 +1,110 @@
import { View, Text, ScrollView, Dimensions } from "react-native";
import React from "react";
import fontSize from "../../constants/fontSize";
import tw from "tailwind-rn";
const { width } = Dimensions.get("window");
const ProductSpecifications = ({ list }) => {
const Property = ({ prop }) => {
return (
<View style={[tw("flex flex-row-reverse mb-3")]}>
<View
style={[
tw("rounded-md rounded-md"),
{ backgroundColor: "#f8f8f8", width: width / 3.5 },
]}
>
<Text
style={[
tw("py-3 pr-2"),
{
fontFamily: "regular",
fontSize: fontSize.base,
color: "#07AFAF",
},
]}
>
{persian[prop]}
</Text>
</View>
<View
style={[
tw("flex-1 mr-2 rounded-md px-2 py-3"),
{ backgroundColor: "#f8f8f8" },
]}
>
<Text
style={[
tw("text-right"),
{
fontFamily: "regular",
fontSize: fontSize.sm,
color: "#646464",
},
]}
>
{list[prop]}
</Text>
</View>
</View>
);
};
return (
<View style={{ flex: 1, paddingHorizontal: 16 }}>
<View
onPress={() => refRBSheet.current.open()}
style={[
tw(
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4"
),
{
backgroundColor: "#50A9FF33",
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
},
]}
>
مشخصات محصول
</Text>
</View>
<ScrollView style={tw("flex-1")}>
{Object?.keys(list)?.map((prop, index) => (
<Property prop={prop} key={index} />
))}
</ScrollView>
</View>
);
};
export default ProductSpecifications;
ProductSpecifications.defaultProps = {
list: {
display: "IPS LCD 4K Samsung backlight",
weight: "2 کیلوگرم",
proccessor: "Intel core I7 11700H",
graphic: "Nvidia 3090TI 6GB",
audio: "Sonic master",
keyboard: "جزیره ای",
accessories: "کیف + کابل تبدیل برق شهری",
},
};
const persian = {
display: "صفحه نمایش",
weight: "وزن",
proccessor: "پردازنده",
graphic: "پردازنده گرافیکی",
audio: "کارت صدا",
keyboard: "کیبرد",
accessories: "متعلقات جعبه",
};

@ -97,11 +97,12 @@ const Drawer = ({ position, setBoxPosition }) => {
return ( return (
<View <View
style={[ style={[
tw(`absolute z-50 top-0 flex flex-row justify-end `), tw(`absolute top-0 flex flex-row justify-end `),
{ {
left: position, left: position,
width: width, width: width,
height: height, height: height,
zIndex : 10000
}, },
]} ]}
> >

@ -1,9 +1,7 @@
import React from 'react'; import React from 'react';
import {TouchableOpacity, Text, Dimensions} from 'react-native'; import {TouchableOpacity, Text} from 'react-native';
import tw from 'tailwind-react-native-classnames'; import tw from 'tailwind-rn';
import fontSize from '../constants/fontSize';
const fullWidth = Dimensions.get('window').width;
export default function Pressable1({ export default function Pressable1({
title, title,
backgroundColor, backgroundColor,
@ -16,7 +14,7 @@ export default function Pressable1({
<TouchableOpacity <TouchableOpacity
onPress={() => onPress()} onPress={() => onPress()}
style={[ style={[
tw.style('rounded-md py-3 flex flex-row justify-center mb-3'), tw('rounded-md py-3 flex flex-row justify-center mb-3'),
{ {
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
borderWidth: border.width, borderWidth: border.width,
@ -24,7 +22,7 @@ export default function Pressable1({
width : width, width : width,
}, },
]}> ]}>
<Text style={{fontSize: fullWidth / 31, color: color, fontFamily : 'light'}}>{title}</Text> <Text style={{fontSize: fontSize.base, color: color, fontFamily : 'regular'}}>{title}</Text>
</TouchableOpacity> </TouchableOpacity>
); );
} }

@ -1,19 +1,21 @@
import React, { useState, useEffect } from "react"; import React, { useState } from "react";
import { import {
View, View,
Dimensions, Dimensions,
ScrollView,
Image, Image,
TextInput, TextInput,
SafeAreaView, SafeAreaView,
StatusBar, StatusBar,
Platform, Platform,
KeyboardAvoidingView, KeyboardAvoidingView,
TouchableWithoutFeedback,
Keyboard,
} from "react-native"; } from "react-native";
import { Header } from "@react-navigation/native-stack";
import { connect } from "react-redux"; import { connect } from "react-redux";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from "../../constants/fontSize"; import fontSize from "../../constants/fontSize";
import Header from "../../components/Header"; import TopHeader from "../../components/Header";
import Navbar from "../../components/Navbar"; import Navbar from "../../components/Navbar";
import CustomPressable from "../../components/Pressable"; import CustomPressable from "../../components/Pressable";
import Or from "../../components/Or"; import Or from "../../components/Or";
@ -36,13 +38,13 @@ function Activation({}) {
}; };
return ( return (
<SafeAreaView <KeyboardAvoidingView
style={{ behavior={Platform.OS === "ios" ? "padding" : "height"}
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0, style={{ flex: 1, backgroundColor: "white" }}
position: "relative",
}}
> >
<KeyboardAvoidingView behavior="padding" keyboardVerticalOffset={-142}> <TouchableWithoutFeedback>
<View style={[tw("flex-1 justify-between flex flex-col"), {paddingTop : StatusBar.currentHeight}]}>
<View>
<Navbar <Navbar
headerOptions={{ headerOptions={{
logo: false, logo: false,
@ -55,22 +57,8 @@ function Activation({}) {
backgroundColor: "#E9F0F7", backgroundColor: "#E9F0F7",
}} }}
/> />
<ScrollView
style={[
tw("bg-white"),
// { height: height - 138 },
]}
keyboardShouldPersistTaps="handled"
showsVerticalScrollIndicator={false}
>
<View
style={[
tw("flex flex-col justify-between items-center"),
{ height: height - StatusBar.currentHeight - 70 },
]}
>
<View style={tw("flex flex-col w-full")}> <View style={tw("flex flex-col w-full")}>
<Header <TopHeader
background={bgQr} background={bgQr}
title={"فعالسازی کتاب دیجیتال"} title={"فعالسازی کتاب دیجیتال"}
description={""} description={""}
@ -79,6 +67,7 @@ function Activation({}) {
<Image source={bookIcon} style={[{ width: 90, height: 90 }]} /> <Image source={bookIcon} style={[{ width: 90, height: 90 }]} />
</View> </View>
</View> </View>
</View>
<View style={tw("w-full flex flex-col px-4")}> <View style={tw("w-full flex flex-col px-4")}>
<TextInput <TextInput
placeholder="کد فعالسازی" placeholder="کد فعالسازی"
@ -111,9 +100,8 @@ function Activation({}) {
/> />
</View> </View>
</View> </View>
</ScrollView> </TouchableWithoutFeedback>
</KeyboardAvoidingView> </KeyboardAvoidingView>
</SafeAreaView>
); );
} }

@ -19,8 +19,8 @@ const Box = ({ info }) => {
<View style={tw("flex flex-col flex-1 mr-3")}> <View style={tw("flex flex-col flex-1 mr-3")}>
<Text <Text
style={{ style={{
fontFamily: "regular", fontFamily: "bold",
fontSize: fontSize.base, fontSize: fontSize.lg,
color: info.title.color, color: info.title.color,
}} }}
> >
@ -42,7 +42,7 @@ const Box = ({ info }) => {
style={[ style={[
tw("self-start mt-2"), tw("self-start mt-2"),
{ {
fontFamily: "light", fontFamily: "bold",
fontSize: fontSize.sm, fontSize: fontSize.sm,
color: info?.link?.color, color: info?.link?.color,
}, },

@ -1,8 +1,8 @@
import React from "react"; import React from "react";
import { View, Text, Pressable } from "react-native"; import { View, Text, Pressable } from "react-native";
import {Entypo} from '@expo/vector-icons'; import { Entypo } from "@expo/vector-icons";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import fontSize from '../../../constants/fontSize'; import fontSize from "../../../constants/fontSize";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
//Color //Color
@ -16,16 +16,18 @@ const Header = ({ title, route }) => {
style={[ style={[
{ {
color: Color.theme1.light.blue5, color: Color.theme1.light.blue5,
fontFamily : 'bold', fontFamily: "bold",
fontSize : fontSize.base fontSize: fontSize.base,
}, },
]} ]}
> >
{title} {title}
</Text> </Text>
{route ? (
<Pressable onPress={() => navigation.navigate(route)}> <Pressable onPress={() => navigation.navigate(route)}>
<Entypo name="chevron-small-left" size={25} color="#196EC0" /> <Entypo name="chevron-small-left" size={25} color="#196EC0" />
</Pressable> </Pressable>
) : null}
</View> </View>
); );
}; };

@ -1,10 +1,12 @@
import React, { useState } from "react"; import React, { useState, useRef } from "react";
import { import {
View, View,
Text, Text,
Image, Image,
ScrollView, ScrollView,
TouchableOpacity TouchableOpacity,
Dimensions,
StatusBar,
} from "react-native"; } from "react-native";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import { Entypo } from "@expo/vector-icons"; import { Entypo } from "@expo/vector-icons";
@ -13,11 +15,16 @@ import Description from "./Description";
import LinkBox from "./LinkBox"; import LinkBox from "./LinkBox";
import Comments from "./Comments"; import Comments from "./Comments";
import Rates from "./Rates"; import Rates from "./Rates";
import ProductSpecifications from "../../../components/BottomSheetComponents/ProductSpecifications";
import ProductReview from "../../../components/BottomSheetComponents/ProductReview";
import ProductQuestion from "../../../components/BottomSheetComponents/ProductQuestion";
import tw from "tailwind-react-native-classnames"; import tw from "tailwind-react-native-classnames";
import fontSize from "../../../constants/fontSize"; import fontSize from "../../../constants/fontSize";
import { product, userProduct } from "../../../redux/actions"; import { product, userProduct } from "../../../redux/actions";
import { connect } from "react-redux"; import { connect } from "react-redux";
const { height } = Dimensions.get("window");
function Book({ book, grades, pushToCart, userId }) { function Book({ book, grades, pushToCart, userId }) {
const navigation = useNavigation(); const navigation = useNavigation();
const [type, setType] = useState(1); const [type, setType] = useState(1);
@ -53,7 +60,7 @@ function Book({ book, grades, pushToCart, userId }) {
<Text <Text
style={{ style={{
color: "#196EC0", color: "#196EC0",
fontSize: fontSize.sm, fontSize: fontSize.base,
fontFamily: "light", fontFamily: "light",
}} }}
> >
@ -81,7 +88,7 @@ function Book({ book, grades, pushToCart, userId }) {
color: "#196EC0", color: "#196EC0",
textAlign: "center", textAlign: "center",
fontSize: fontSize.sm, fontSize: fontSize.sm,
fontFamily: "light", fontFamily: "regular",
}} }}
> >
{" "} {" "}
@ -97,7 +104,7 @@ function Book({ book, grades, pushToCart, userId }) {
color: "#196EC0", color: "#196EC0",
textAlign: "center", textAlign: "center",
fontSize: fontSize.sm, fontSize: fontSize.sm,
fontFamily: "light", fontFamily: "regular",
}} }}
> >
{" "} {" "}
@ -113,7 +120,7 @@ function Book({ book, grades, pushToCart, userId }) {
color: "#196EC0", color: "#196EC0",
textAlign: "center", textAlign: "center",
fontSize: fontSize.sm, fontSize: fontSize.sm,
fontFamily: "light", fontFamily: "regular",
}} }}
> >
{" "} {" "}
@ -121,11 +128,15 @@ function Book({ book, grades, pushToCart, userId }) {
</Text> </Text>
</View> </View>
</View> </View>
<View style={"flex flex-col mt-3"}> <View style={"flex flex-col mt-6"}>
<Text <Text
style={[ style={[
tw.style("w-full text-right font-medium"), tw.style("w-full text-right"),
{ color: "#196EC0", fontSize: fontSize.sm, fontFamily: "regular" }, {
color: "#196EC0",
fontSize: fontSize.base,
fontFamily: "regular",
},
]} ]}
> >
نسخه محصول را انتخاب کنید نسخه محصول را انتخاب کنید
@ -171,21 +182,26 @@ function Book({ book, grades, pushToCart, userId }) {
color={"#196EC0"} color={"#196EC0"}
border={{ color: "#196EC0", width: 1 }} border={{ color: "#196EC0", width: 1 }}
width={"33%"} width={"33%"}
onPress={() => {}}
/> />
<TouchableOpacity <TouchableOpacity
style={[ style={[
tw.style( tw.style(
"w-full rounded-md flex flex-row justify-center items-center py-2.5" "w-full rounded-md flex flex-row justify-center items-center py-3 mt-4"
), ),
{ backgroundColor: "#196EC01a" }, { backgroundColor: "#196EC01a" },
]} ]}
onPress={() => navigation.navigate("Video", {id : book.id})} onPress={() => navigation.navigate("Video", { id: book.id })}
> >
<Entypo name="chevron-small-left" size={20} color="#196EC0" /> <Entypo name="chevron-small-left" size={20} color="#196EC0" />
<Text <Text
style={[ style={[
tw.style(""), tw.style(""),
{ color: "#275077", fontSize: fontSize.sm, fontFamily: "light" }, {
color: "#275077",
fontSize: fontSize.base,
fontFamily: "light",
},
]} ]}
> >
مشاهده دوره ویدئویی این محصول مشاهده دوره ویدئویی این محصول
@ -195,9 +211,24 @@ function Book({ book, grades, pushToCart, userId }) {
{book.product[type].description && ( {book.product[type].description && (
<Description description={book.description} /> <Description description={book.description} />
)} )}
<LinkBox title="مشخصات محصول" path="" /> <LinkBox
<LinkBox title="نقد بررسی و توضیحات تکمیلی محصول" path="" /> title="مشخصات محصول"
<LinkBox title="پرسش و پاسخ" path="" /> key={"0"}
component={<ProductSpecifications />}
height={height - height / 4}
/>
<LinkBox
title="نقد بررسی و توضیحات تکمیلی محصول"
key={"1"}
component={<ProductReview />}
height={height - height / 4}
/>
<LinkBox
title="پرسش و پاسخ"
key={"2"}
component={<ProductQuestion />}
height={height - height / 4}
/>
{product.rates && ( {product.rates && (
<View <View
style={tw.style( style={tw.style(

@ -1,29 +1,61 @@
import React from 'react'; import React, { useRef } from "react";
import {View, Text, Dimensions, Image} from 'react-native'; import { Text, TouchableOpacity, Dimensions, ScrollView } from "react-native";
import tw from 'tailwind-react-native-classnames'; import RBSheet from "react-native-raw-bottom-sheet";
import fontSize from '../../../constants/fontSize'; import tw from "tailwind-react-native-classnames";
import {Entypo} from '@expo/vector-icons'; import fontSize from "../../../constants/fontSize";
import { Entypo } from "@expo/vector-icons";
const width = Dimensions.get('window').width; export default function Description({ title, component, height }) {
const height = Dimensions.get('window').height; const refRBSheet = useRef();
export default function Description({title, path}) {
return ( return (
<View <>
<TouchableOpacity
onPress={() => refRBSheet.current.open()}
style={[ style={[
tw.style('flex flex-row-reverse justify-between items-center mt-3 rounded-md px-5 py-2.5'), tw.style(
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-5 py-3"
),
{ {
backgroundColor: '#50A9FF33' backgroundColor: "#50A9FF33",
} },
]}> ]}
>
<Text <Text
style={[ style={[
{fontSize: fontSize.sm, color: '#275077', fontFamily: 'regular'}, {
tw.style(''), fontSize: fontSize.base,
]}> color: "#275077",
fontFamily: "regular",
},
tw.style(""),
]}
>
{title} {title}
</Text> </Text>
<Entypo name="chevron-small-left" size={20} color="#196EC0" /> <Entypo name="chevron-small-left" size={20} color="#196EC0" />
</View> </TouchableOpacity>
<RBSheet
ref={refRBSheet}
closeOnDragDown={true}
dragFromTopOnly={true}
closeOnPressMask={true}
height={height}
customStyles={{
wrapper: {
backgroundColor: "#00000077",
},
container: {
padding : 0,
borderTopLeftRadius: 30,
borderTopRightRadius: 30,
},
draggableIcon: {
backgroundColor: "#000",
},
}}
>
{component}
</RBSheet>
</>
); );
} }

@ -13,7 +13,7 @@ import { BarCodeScanner } from "expo-barcode-scanner";
import Colors from "../../../constants/Colors"; import Colors from "../../../constants/Colors";
import { Entypo } from "@expo/vector-icons"; import { Entypo } from "@expo/vector-icons";
const { width, height } = Dimensions.get("window"); const { width, height } = Dimensions.get("screen");
//assets //assets
import laptopImage from "../assets/laptop.png"; import laptopImage from "../assets/laptop.png";

@ -16,7 +16,7 @@ const {height} = Dimensions.get("window");
function QRContent({ route, getQrData, data, grades }) { function QRContent({ route, getQrData, data, grades }) {
useEffect(() => { useEffect(() => {
getQrData({ tail: "zist10-17" }); getQrData({ tail: route.params.data });
}, []); }, []);
useEffect(() => { useEffect(() => {

@ -11,7 +11,7 @@ import {
LayoutAnimation, LayoutAnimation,
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { userProduct, userFactor} from "../../redux/actions"; import { userProduct, userFactor } from "../../redux/actions";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
import Product from "./components/Product"; import Product from "./components/Product";
import Code from "./components/Code"; import Code from "./components/Code";
@ -20,7 +20,7 @@ import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer"; import Drawer from "../../components/Drawer";
import tw from "tailwind-react-native-classnames"; import tw from "tailwind-react-native-classnames";
const width = Dimensions.get("window").width; const { width, height } = Dimensions.get("window");
const PriceStatus = ({ name, value, type }) => { const PriceStatus = ({ name, value, type }) => {
return ( return (
@ -67,6 +67,7 @@ function ShoppingCart({ userId, list, factorInfo, getList, getFactorInfo }) {
style={{ style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0, paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative", position: "relative",
height: height,
}} }}
> >
<Navbar <Navbar
@ -86,7 +87,8 @@ function ShoppingCart({ userId, list, factorInfo, getList, getFactorInfo }) {
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={styles.container} style={styles.container}
> >
{list.length > 0 && list.map((product, index) => ( {list.length > 0 &&
list.map((product, index) => (
<Product key={index} product={product} /> <Product key={index} product={product} />
))} ))}
<Code /> <Code />
@ -130,9 +132,10 @@ function ShoppingCart({ userId, list, factorInfo, getList, getFactorInfo }) {
{ fontSize: width / 31, color: "#246E8A", fontFamily: "bold" }, { fontSize: width / 31, color: "#246E8A", fontFamily: "bold" },
]} ]}
> >
{factorInfo?.payPrice + ' ' + 'تومان'} {factorInfo?.payPrice + " " + "تومان"}
</Text> </Text>
</View> </View>
<View style={tw.style("absolute left-0 bottom-6 w-full")}>
<Pressable <Pressable
style={[ style={[
tw.style( tw.style(
@ -151,6 +154,7 @@ function ShoppingCart({ userId, list, factorInfo, getList, getFactorInfo }) {
</Text> </Text>
<Ionicons name="alert-circle-outline" size={20} color="#196EC0" /> <Ionicons name="alert-circle-outline" size={20} color="#196EC0" />
</Pressable> </Pressable>
<CustomPressable <CustomPressable
title={"ادامه فرایند خرید"} title={"ادامه فرایند خرید"}
backgroundColor="#196EC0" backgroundColor="#196EC0"
@ -158,6 +162,7 @@ function ShoppingCart({ userId, list, factorInfo, getList, getFactorInfo }) {
border={{ color: "#196EC0", width: 0 }} border={{ color: "#196EC0", width: 0 }}
width={"100%"} width={"100%"}
/> />
</View>
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>
); );
@ -183,6 +188,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(ShoppingCart);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
contentContainerStyle: { contentContainerStyle: {
paddingBottom: 100, paddingBottom: 100,
flex: 1,
position: "relative",
}, },
container: { container: {
width: Dimensions.get("window").width, width: Dimensions.get("window").width,

@ -10,7 +10,8 @@ function Splash({ navigation, isLogin }) {
useEffect(() => { useEffect(() => {
if (isLogin !== null) { if (isLogin !== null) {
setTimeout(() => { setTimeout(() => {
isLogin === false // isLogin === false
0
? navigation.navigate("Login") ? navigation.navigate("Login")
: navigation.navigate("Root"); : navigation.navigate("Root");
}, 3000); }, 3000);

@ -1,12 +1,34 @@
import { View, Text } from 'react-native'; import { View, Text, Button } from "react-native";
import React from 'react'; import React, {useRef} from "react";
import RBSheet from "react-native-raw-bottom-sheet";
const Tests = () => { export default function Test() {
const refRBSheet = useRef();
return ( return (
<View> <View
<Text></Text> style={{
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "#fff"
}}
>
<Button title="OPEN BOTTOM SHEET" onPress={() => refRBSheet.current.open()} />
<RBSheet
ref={refRBSheet}
closeOnDragDown={true}
closeOnPressMask={true}
customStyles={{
wrapper: {
backgroundColor: "transparent"
},
draggableIcon: {
backgroundColor: "#000"
}
}}
>
<Text>reza</Text>
</RBSheet>
</View> </View>
); );
}; }
export default Tests;

@ -1,10 +1,6 @@
import React from "react"; import React from "react";
import { import { View, Text, Pressable, TouchableOpacity } from "react-native";
View, import {SimpleLineIcons} from '@expo/vector-icons';
Text,
Pressable,
TouchableOpacity,
} from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { publicApi } from "../../../redux/actions"; import { publicApi } from "../../../redux/actions";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
@ -15,7 +11,13 @@ import { useNavigation } from "@react-navigation/native";
const duration = (value) => { const duration = (value) => {
const minute = value % 60; const minute = value % 60;
const hour = Math.round(value / 60); const hour = Math.round(value / 60);
return (hour > 0 ? hour + " " + "ساعت" : "") + " " + minute + " " + "دقیقه"; return (
(hour > 0
? (hour.toString().length === 1 ? "0" + hour.toString() : hour) + ""
: "") +
":" +
(minute.toString().length === 1 ? "0" + minute.toString() : minute)
);
}; };
const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => { const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
@ -32,7 +34,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
<View <View
style={[ style={[
tw( tw(
"w-full flex flex-row-reverse justify-between items-center py-1.5 px-2" "w-full flex flex-row-reverse justify-between items-center py-2 px-3"
), ),
{ {
borderBottomWidth: 1, borderBottomWidth: 1,
@ -44,7 +46,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
style={[ style={[
{ {
fontFamily: "regular", fontFamily: "regular",
fontSize: fontSize.sm, fontSize: fontSize.base,
color: Colors.theme1.light.blue5, color: Colors.theme1.light.blue5,
}, },
]} ]}
@ -55,7 +57,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
style={[ style={[
{ {
fontFamily: "regular", fontFamily: "regular",
fontSize: fontSize.sm, fontSize: fontSize.base,
color: Colors.theme1.light.blue5, color: Colors.theme1.light.blue5,
}, },
]} ]}
@ -67,7 +69,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
{1 && ( {1 && (
<Pressable <Pressable
style={[ style={[
tw("flex flex-1 flex-row items-center py-1.5 px-2"), tw("flex flex-1 flex-row items-center py-2 px-2"),
{ {
borderLeftWidth: 1, borderLeftWidth: 1,
borderColor: Colors.theme1.light.blue3, borderColor: Colors.theme1.light.blue3,
@ -75,9 +77,9 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
]} ]}
onPress={() => onPress={() =>
navigation.navigate("VideoDisplay", { navigation.navigate("VideoDisplay", {
season : season, season: season,
unit : unit, unit: unit,
name : seasonName name: seasonName,
}) })
} }
> >
@ -86,7 +88,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
width: "100%", width: "100%",
textAlign: "center", textAlign: "center",
fontFamily: "regular", fontFamily: "regular",
fontSize: fontSize.sm, fontSize: fontSize.base,
color: Colors.theme1.light.blue5, color: Colors.theme1.light.blue5,
}} }}
> >
@ -94,7 +96,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
</Text> </Text>
</Pressable> </Pressable>
)} )}
{1 && ( {/* {0 && (
<Pressable <Pressable
style={tw("flex flex-1 flex-row items-center py-1.5 px-2")} style={tw("flex flex-1 flex-row items-center py-1.5 px-2")}
> >
@ -110,7 +112,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
دانلود دانلود
</Text> </Text>
</Pressable> </Pressable>
)} )} */}
</View> </View>
</View> </View>
); );
@ -120,7 +122,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
<TouchableOpacity <TouchableOpacity
style={[ style={[
tw( tw(
"flex flex-row-reverse justify-between items-center rounded-md py-2 px-3 mb-3" "flex flex-row-reverse justify-between items-center rounded-md py-3 px-3 mb-3"
), ),
{ backgroundColor: Colors.theme1.light.blue5 }, { backgroundColor: Colors.theme1.light.blue5 },
]} ]}
@ -130,7 +132,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
style={[ style={[
{ {
fontFamily: "regular", fontFamily: "regular",
fontSize: fontSize.sm, fontSize: fontSize.base,
color: "white", color: "white",
}, },
]} ]}
@ -140,6 +142,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
.name .name
} }
</Text> </Text>
<SimpleLineIcons name={season[0].categoryId === activeSeason ? "arrow-up" : "arrow-down"} size={14} color="white" />
{/* <Text {/* <Text
style={[ style={[
{ {

@ -38,11 +38,18 @@ function Product({
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut); LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%"); setPosition(position === "100%" ? "0%" : "100%");
}; };
useEffect(() => {
if(book){
console.log(book);
}
},[book]);
return ( return (
<SafeAreaView <SafeAreaView
style={{ style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0, paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative", position: "relative",
height : height
}} }}
> >
<Navbar <Navbar
@ -62,7 +69,7 @@ function Product({
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={styles.container} style={styles.container}
> >
<View style={tw("flex flex-col")}> <View style={tw(" w-full flex flex-col")}>
<View <View
style={[ style={[
tw( tw(
@ -73,7 +80,7 @@ function Product({
> >
<Image <Image
source={{uri : `https://dnvn.ir/api/v1/file/${book?.fileIds}`}} source={{uri : `https://dnvn.ir/api/v1/file/${book?.fileIds}`}}
style={tw("w-full rounded-md h-full absolute left-0 top-0")} style={[tw("rounded-md absolute left-0 top-0 w-full h-full")]}
/> />
<Image <Image
source={{ uri: `https://dnvn.ir/api/v1/file/${book?.fileIds}` }} source={{ uri: `https://dnvn.ir/api/v1/file/${book?.fileIds}` }}
@ -130,6 +137,7 @@ function Product({
const styles = StyleSheet.create({ const styles = StyleSheet.create({
contentContainerStyle: { contentContainerStyle: {
paddingBottom: 100, paddingBottom: 100,
// flex : 1,
}, },
container: { container: {
width: Dimensions.get("window").width, width: Dimensions.get("window").width,

@ -3,14 +3,23 @@ import { View, Text, Dimensions, Pressable } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { publicApi } from "../../../../redux/actions"; import { publicApi } from "../../../../redux/actions";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from "../../../../constants/fontSize";
import Colors from "../../../../constants/Colors"; import Colors from "../../../../constants/Colors";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
const { width} = Dimensions.get("window"); const { width } = Dimensions.get("window");
const Season = ({ season, activeUnit, name }) => { const Season = ({ season, activeUnit, name, setVideoActive }) => {
const navigation = useNavigation(); const navigation = useNavigation();
const Unit = ({ unit }) => { const Unit = ({ unit }) => {
const selectVideo = () => {
setVideoActive(unit);
navigation.navigate("VideoDisplay", {
season: season,
unit: unit,
name: name,
})
};
return ( return (
<View <View
style={[ style={[
@ -24,12 +33,12 @@ const Season = ({ season, activeUnit, name }) => {
<View <View
style={[ style={[
tw( tw(
"w-full flex flex-row-reverse justify-between items-center py-1.5 px-2" "w-full flex flex-row-reverse justify-between items-center py-1.5 px-3"
), ),
{ {
borderBottomWidth: 1, borderBottomWidth: 1,
borderColor: Colors.theme1.light.blue3, borderColor: Colors.theme1.light.blue3,
backgroundColor: activeUnit === unit ? "#aaa" : "transparent", backgroundColor: activeUnit === unit ? "#1a1" : "transparent",
}, },
]} ]}
> >
@ -37,7 +46,7 @@ const Season = ({ season, activeUnit, name }) => {
style={[ style={[
{ {
fontFamily: "regular", fontFamily: "regular",
fontSize: width / 34, fontSize: fontSize.base,
color: color:
activeUnit === unit ? "white" : Colors.theme1.light.blue5, activeUnit === unit ? "white" : Colors.theme1.light.blue5,
}, },
@ -62,27 +71,21 @@ const Season = ({ season, activeUnit, name }) => {
{1 && ( {1 && (
<Pressable <Pressable
style={[ style={[
tw("flex flex-1 flex-row items-center py-1.5 px-2"), tw("flex flex-1 flex-row items-center py-2 px-2"),
{ {
borderLeftWidth: 1, borderLeftWidth: 1,
borderColor: Colors.theme1.light.blue3, borderColor: Colors.theme1.light.blue3,
backgroundColor: "white", backgroundColor: "white",
}, },
]} ]}
onPress={() => onPress={() => selectVideo()}
navigation.navigate("VideoDisplay", {
season: season,
unit: unit,
name: name,
})
}
> >
<Text <Text
style={{ style={{
width: "100%", width: "100%",
textAlign: "center", textAlign: "center",
fontFamily: "regular", fontFamily: "regular",
fontSize: width / 34, fontSize: fontSize.sm,
color: Colors.theme1.light.blue5, color: Colors.theme1.light.blue5,
}} }}
> >
@ -90,7 +93,7 @@ const Season = ({ season, activeUnit, name }) => {
</Text> </Text>
</Pressable> </Pressable>
)} )}
{1 && ( {/* {0 && (
<Pressable <Pressable
style={tw("flex flex-1 flex-row items-center py-1.5 px-2")} style={tw("flex flex-1 flex-row items-center py-1.5 px-2")}
> >
@ -106,7 +109,7 @@ const Season = ({ season, activeUnit, name }) => {
دانلود دانلود
</Text> </Text>
</Pressable> </Pressable>
)} )} */}
</View> </View>
</View> </View>
); );
@ -116,7 +119,7 @@ const Season = ({ season, activeUnit, name }) => {
<Pressable <Pressable
style={[ style={[
tw( tw(
"flex flex-row-reverse justify-between items-center rounded-md py-2 px-3 mb-3" "flex flex-row-reverse justify-between items-center rounded-md py-2.5 px-3 mb-3"
), ),
{ backgroundColor: Colors.theme1.light.blue5 }, { backgroundColor: Colors.theme1.light.blue5 },
]} ]}
@ -125,7 +128,7 @@ const Season = ({ season, activeUnit, name }) => {
style={[ style={[
{ {
fontFamily: "regular", fontFamily: "regular",
fontSize: width / 34, fontSize: fontSize.base,
color: "white", color: "white",
}, },
]} ]}
@ -136,7 +139,7 @@ const Season = ({ season, activeUnit, name }) => {
style={[ style={[
{ {
fontFamily: "regular", fontFamily: "regular",
fontSize: width / 36, fontSize: fontSize.sm,
color: "white", color: "white",
}, },
]} ]}

@ -53,7 +53,7 @@ const NewestVideo = ({ videos, grades }) => {
}; };
return ( return (
<View style={tw("w-full flex flex-col w-full")}> <View style={tw("w-full flex flex-col w-full")}>
<Header title="جدیدترین دورهها" /> <Header title="جدیدترین دورهها" route="" />
<View style={tw("w-full flex flex-row flex-wrap justify-between mt-3")}> <View style={tw("w-full flex flex-row flex-wrap justify-between mt-3")}>
{videos.map((video, index) => ( {videos.map((video, index) => (
<Video video={video} key={index} /> <Video video={video} key={index} />

@ -5249,6 +5249,11 @@ react-native-codegen@^0.0.6:
jscodeshift "^0.11.0" jscodeshift "^0.11.0"
nullthrows "^1.1.1" nullthrows "^1.1.1"
react-native-iphone-x-helper@^1.3.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz#20c603e9a0e765fd6f97396638bdeb0e5a60b010"
integrity sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==
react-native-openanything@^0.0.6: react-native-openanything@^0.0.6:
version "0.0.6" version "0.0.6"
resolved "https://registry.yarnpkg.com/react-native-openanything/-/react-native-openanything-0.0.6.tgz#7b694a28ce6de0363d46474ab3c72f5c0d14e658" resolved "https://registry.yarnpkg.com/react-native-openanything/-/react-native-openanything-0.0.6.tgz#7b694a28ce6de0363d46474ab3c72f5c0d14e658"
@ -5271,6 +5276,11 @@ react-native-qrcode-scanner@^1.5.4:
prop-types "^15.5.10" prop-types "^15.5.10"
react-native-permissions "^2.0.2" react-native-permissions "^2.0.2"
react-native-raw-bottom-sheet@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/react-native-raw-bottom-sheet/-/react-native-raw-bottom-sheet-2.2.0.tgz#d11dabb86aadb014273767ef7b554924b13633c5"
integrity sha512-qL4JKIqvbcVxbkKzeh51hjV7suoJN3ouxzvLmOg0FBUV1yiJAfEbacjQdtRCI6+OU5pyGFBIifLsTXcFDwHggg==
react-native-restart@^0.0.22: react-native-restart@^0.0.22:
version "0.0.22" version "0.0.22"
resolved "https://registry.yarnpkg.com/react-native-restart/-/react-native-restart-0.0.22.tgz#81fcb7f31e35951d85410c68b9556acf3ab88705" resolved "https://registry.yarnpkg.com/react-native-restart/-/react-native-restart-0.0.22.tgz#81fcb7f31e35951d85410c68b9556acf3ab88705"
@ -5345,6 +5355,14 @@ react-native@0.64.3:
whatwg-fetch "^3.0.0" whatwg-fetch "^3.0.0"
ws "^6.1.4" ws "^6.1.4"
react-navigation-stack@^2.10.4:
version "2.10.4"
resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-2.10.4.tgz#377fd6533f8ae0cf5ca5a435a0115851f010306a"
integrity sha512-3LE1PFsFV9v4PUlZRATMotqs6H7MOOpIKtjyP+l8D1cyzYmsMQh3EFikeDfzGQUXIvy8VyLAMtcEssicQPYvFA==
dependencies:
color "^3.1.3"
react-native-iphone-x-helper "^1.3.0"
react-redux@^7.2.6: react-redux@^7.2.6:
version "7.2.6" version "7.2.6"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.6.tgz#49633a24fe552b5f9caf58feb8a138936ddfe9aa" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.6.tgz#49633a24fe552b5f9caf58feb8a138936ddfe9aa"

Loading…
Cancel
Save