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. 128
      src/screens/Activation/index.js
  10. 6
      src/screens/Contact/Box.js
  11. 16
      src/screens/Home/components/Header.js
  12. 61
      src/screens/Product/components/Book.js
  13. 80
      src/screens/Product/components/LinkBox.js
  14. 2
      src/screens/QR/Scan/index.js
  15. 2
      src/screens/QRContent/index.js
  16. 63
      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"
component={VODStackScreen}
options={{
unmountOnExit : true,
unmountOnBlur : true,
title : "ویدئوها",
tabBarIcon: ({ focused, color }) =>
focused ? (
@ -185,7 +187,7 @@ const VODStackScreen = () => {
return (
<VODStack.Navigator screenOptions={{ headerShown: false }}>
<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.Navigator>
);

@ -37,11 +37,13 @@
"react-native-awesome-alerts": "^1.5.2",
"react-native-openanything": "^0.0.6",
"react-native-qrcode-scanner": "^1.5.4",
"react-native-raw-bottom-sheet": "^2.2.0",
"react-native-restart": "^0.0.22",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-select-dropdown": "^1.6.0",
"react-native-web": "0.17.1",
"react-navigation-stack": "^2.10.4",
"react-redux": "^7.2.6",
"redux": "^4.1.2",
"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 (
<View
style={[
tw(`absolute z-50 top-0 flex flex-row justify-end `),
tw(`absolute top-0 flex flex-row justify-end `),
{
left: position,
width: width,
height: height,
zIndex : 10000
},
]}
>

@ -1,9 +1,7 @@
import React from 'react';
import {TouchableOpacity, Text, Dimensions} from 'react-native';
import tw from 'tailwind-react-native-classnames';
const fullWidth = Dimensions.get('window').width;
import {TouchableOpacity, Text} from 'react-native';
import tw from 'tailwind-rn';
import fontSize from '../constants/fontSize';
export default function Pressable1({
title,
backgroundColor,
@ -16,7 +14,7 @@ export default function Pressable1({
<TouchableOpacity
onPress={() => onPress()}
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,
borderWidth: border.width,
@ -24,7 +22,7 @@ export default function Pressable1({
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>
);
}

@ -1,19 +1,21 @@
import React, { useState, useEffect } from "react";
import React, { useState } from "react";
import {
View,
Dimensions,
ScrollView,
Image,
TextInput,
SafeAreaView,
StatusBar,
Platform,
KeyboardAvoidingView,
TouchableWithoutFeedback,
Keyboard,
} from "react-native";
import { Header } from "@react-navigation/native-stack";
import { connect } from "react-redux";
import tw from "tailwind-rn";
import fontSize from "../../constants/fontSize";
import Header from "../../components/Header";
import TopHeader from "../../components/Header";
import Navbar from "../../components/Navbar";
import CustomPressable from "../../components/Pressable";
import Or from "../../components/Or";
@ -36,41 +38,27 @@ function Activation({}) {
};
return (
<SafeAreaView
style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
}}
<KeyboardAvoidingView
behavior={Platform.OS === "ios" ? "padding" : "height"}
style={{ flex: 1, backgroundColor: "white" }}
>
<KeyboardAvoidingView behavior="padding" keyboardVerticalOffset={-142}>
<Navbar
headerOptions={{
logo: false,
menu: false,
hamburgerMenu: false,
title: "",
bookmark: false,
qr: true,
back: true,
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 },
]}
>
<TouchableWithoutFeedback>
<View style={[tw("flex-1 justify-between flex flex-col"), {paddingTop : StatusBar.currentHeight}]}>
<View>
<Navbar
headerOptions={{
logo: false,
menu: false,
hamburgerMenu: false,
title: "",
bookmark: false,
qr: true,
back: true,
backgroundColor: "#E9F0F7",
}}
/>
<View style={tw("flex flex-col w-full")}>
<Header
<TopHeader
background={bgQr}
title={"فعالسازی کتاب دیجیتال"}
description={""}
@ -79,41 +67,41 @@ function Activation({}) {
<Image source={bookIcon} style={[{ width: 90, height: 90 }]} />
</View>
</View>
<View style={tw("w-full flex flex-col px-4")}>
<TextInput
placeholder="کد فعالسازی"
placeholderTextColor="#70707070"
style={[
tw("w-full mt-4 mb-3 rounded-md text-center py-2"),
{
backgroundColor: "#F9F9F9",
borderColor: "#DFDFDF",
borderWidth: 1,
fontSize: fontSize.base,
fontFamily: "light",
},
]}
/>
<CustomPressable
title={"تایید کد"}
backgroundColor="#196EC0"
color={"white"}
border={{ color: "#196EC0", width: 0 }}
width={"100%"}
/>
<Or />
<CustomPressable
title={"فعالسازی با کد QR"}
backgroundColor="#98B2CB"
color={"white"}
border={{ color: "#196EC0", width: 0 }}
width={"100%"}
/>
</View>
</View>
</ScrollView>
</KeyboardAvoidingView>
</SafeAreaView>
<View style={tw("w-full flex flex-col px-4")}>
<TextInput
placeholder="کد فعالسازی"
placeholderTextColor="#70707070"
style={[
tw("w-full mt-4 mb-3 rounded-md text-center py-2"),
{
backgroundColor: "#F9F9F9",
borderColor: "#DFDFDF",
borderWidth: 1,
fontSize: fontSize.base,
fontFamily: "light",
},
]}
/>
<CustomPressable
title={"تایید کد"}
backgroundColor="#196EC0"
color={"white"}
border={{ color: "#196EC0", width: 0 }}
width={"100%"}
/>
<Or />
<CustomPressable
title={"فعالسازی با کد QR"}
backgroundColor="#98B2CB"
color={"white"}
border={{ color: "#196EC0", width: 0 }}
width={"100%"}
/>
</View>
</View>
</TouchableWithoutFeedback>
</KeyboardAvoidingView>
);
}

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

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

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

@ -1,29 +1,61 @@
import React from 'react';
import {View, Text, Dimensions, Image} from 'react-native';
import tw from 'tailwind-react-native-classnames';
import fontSize from '../../../constants/fontSize';
import {Entypo} from '@expo/vector-icons';
import React, { useRef } from "react";
import { Text, TouchableOpacity, Dimensions, ScrollView } from "react-native";
import RBSheet from "react-native-raw-bottom-sheet";
import tw from "tailwind-react-native-classnames";
import fontSize from "../../../constants/fontSize";
import { Entypo } from "@expo/vector-icons";
const width = Dimensions.get('window').width;
const height = Dimensions.get('window').height;
export default function Description({title, path}) {
export default function Description({ title, component, height }) {
const refRBSheet = useRef();
return (
<View
style={[
tw.style('flex flex-row-reverse justify-between items-center mt-3 rounded-md px-5 py-2.5'),
{
backgroundColor: '#50A9FF33'
}
]}>
<Text
<>
<TouchableOpacity
onPress={() => refRBSheet.current.open()}
style={[
{fontSize: fontSize.sm, color: '#275077', fontFamily: 'regular'},
tw.style(''),
]}>
{title}
</Text>
<Entypo name="chevron-small-left" size={20} color="#196EC0" />
</View>
tw.style(
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-5 py-3"
),
{
backgroundColor: "#50A9FF33",
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
},
tw.style(""),
]}
>
{title}
</Text>
<Entypo name="chevron-small-left" size={20} color="#196EC0" />
</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 { Entypo } from "@expo/vector-icons";
const { width, height } = Dimensions.get("window");
const { width, height } = Dimensions.get("screen");
//assets
import laptopImage from "../assets/laptop.png";

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

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

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

@ -1,12 +1,34 @@
import { View, Text } from 'react-native';
import React from 'react';
import { View, Text, Button } from "react-native";
import React, {useRef} from "react";
import RBSheet from "react-native-raw-bottom-sheet";
const Tests = () => {
export default function Test() {
const refRBSheet = useRef();
return (
<View>
<Text></Text>
<View
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>
);
};
export default Tests;
}

@ -1,10 +1,6 @@
import React from "react";
import {
View,
Text,
Pressable,
TouchableOpacity,
} from "react-native";
import { View, Text, Pressable, TouchableOpacity } from "react-native";
import {SimpleLineIcons} from '@expo/vector-icons';
import { connect } from "react-redux";
import { publicApi } from "../../../redux/actions";
import tw from "tailwind-rn";
@ -15,7 +11,13 @@ import { useNavigation } from "@react-navigation/native";
const duration = (value) => {
const minute = 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 }) => {
@ -32,7 +34,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
<View
style={[
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,
@ -44,7 +46,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
style={[
{
fontFamily: "regular",
fontSize: fontSize.sm,
fontSize: fontSize.base,
color: Colors.theme1.light.blue5,
},
]}
@ -55,7 +57,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
style={[
{
fontFamily: "regular",
fontSize: fontSize.sm,
fontSize: fontSize.base,
color: Colors.theme1.light.blue5,
},
]}
@ -67,7 +69,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
{1 && (
<Pressable
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,
borderColor: Colors.theme1.light.blue3,
@ -75,9 +77,9 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
]}
onPress={() =>
navigation.navigate("VideoDisplay", {
season : season,
unit : unit,
name : seasonName
season: season,
unit: unit,
name: seasonName,
})
}
>
@ -86,7 +88,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
width: "100%",
textAlign: "center",
fontFamily: "regular",
fontSize: fontSize.sm,
fontSize: fontSize.base,
color: Colors.theme1.light.blue5,
}}
>
@ -94,7 +96,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
</Text>
</Pressable>
)}
{1 && (
{/* {0 && (
<Pressable
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>
</Pressable>
)}
)} */}
</View>
</View>
);
@ -120,7 +122,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
<TouchableOpacity
style={[
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 },
]}
@ -130,7 +132,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
style={[
{
fontFamily: "regular",
fontSize: fontSize.sm,
fontSize: fontSize.base,
color: "white",
},
]}
@ -140,6 +142,7 @@ const Season = ({ season, toggle, activeSeason, realSeasons, seasonName }) => {
.name
}
</Text>
<SimpleLineIcons name={season[0].categoryId === activeSeason ? "arrow-up" : "arrow-down"} size={14} color="white" />
{/* <Text
style={[
{

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

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

@ -53,7 +53,7 @@ const NewestVideo = ({ videos, grades }) => {
};
return (
<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")}>
{videos.map((video, index) => (
<Video video={video} key={index} />

@ -5249,6 +5249,11 @@ react-native-codegen@^0.0.6:
jscodeshift "^0.11.0"
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:
version "0.0.6"
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"
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:
version "0.0.22"
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"
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:
version "7.2.6"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.6.tgz#49633a24fe552b5f9caf58feb8a138936ddfe9aa"

Loading…
Cancel
Save