reza added something

master
Reza_ashrafi 3 years ago
parent 3310d24429
commit 8e99adb956
  1. 4
      navigation/index.js
  2. 10
      src/components/BottomSheetComponents/ProductQuestion.js
  3. 2
      src/components/BottomSheetComponents/ProductReview.js
  4. 6
      src/components/BottomSheetComponents/ProductSpecifications.js
  5. 8
      src/screens/Home/components/Blogs.js
  6. 6
      src/screens/Home/components/MyBooks.js
  7. 7
      src/screens/Home/components/Scroll.js
  8. 12
      src/screens/Home/components/Videos.js
  9. 2
      src/screens/Home/index.js
  10. BIN
      src/screens/Login/assets/logo.png
  11. 65
      src/screens/Login/index.js
  12. 96
      src/screens/Otp/index.js
  13. 17
      src/screens/Splash/index.js

@ -453,8 +453,8 @@ const Navigation = ({ getStatus, isLogin }) => {
contentStyle: { backgroundColor: Colors.theme1[colorScheme].white }, contentStyle: { backgroundColor: Colors.theme1[colorScheme].white },
}} }}
> >
<Stack.Screen name="Splash" component={Splash} /> {/* <Stack.Screen name="Splash" component={Splash} /> */}
<Stack.Screen name="Login" component={Login} /> {/* <Stack.Screen name="Login" component={Login} /> */}
<Stack.Screen name="Otp" component={Otp} /> <Stack.Screen name="Otp" component={Otp} />
<Stack.Screen name="QR" component={QR} /> <Stack.Screen name="QR" component={QR} />
<Stack.Screen name="Root" component={BottomTabNavigator} /> <Stack.Screen name="Root" component={BottomTabNavigator} />

@ -27,7 +27,7 @@ const ProductQuestion = ({ list, mobile }) => {
style={{ style={{
fontFamily: "bold", fontFamily: "bold",
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[colorScheme].green79,
fontSize: mobile ? fontSize.lg : fontSize.xl3, fontSize: mobile ? fontSize.tiny : fontSize.xl3,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}} }}
> >
@ -37,7 +37,7 @@ const ProductQuestion = ({ list, mobile }) => {
style={{ style={{
fontFamily: "bold", fontFamily: "bold",
color: "#323232", color: "#323232",
fontSize: mobile ? fontSize.tiny : fontSize.base, fontSize: mobile ? fontSize.sm : fontSize.base,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}} }}
> >
@ -49,7 +49,7 @@ const ProductQuestion = ({ list, mobile }) => {
style={{ style={{
fontFamily: "bold", fontFamily: "bold",
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.lg, fontSize: fontSize.tiny,
marginTop: 10, marginTop: 10,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}} }}
@ -60,7 +60,7 @@ const ProductQuestion = ({ list, mobile }) => {
style={{ style={{
fontFamily: "bold", fontFamily: "bold",
color: Colors.theme1[colorScheme].gray2077, color: Colors.theme1[colorScheme].gray2077,
fontSize: mobile ? fontSize.tiny : fontSize.base, fontSize: mobile ? fontSize.sm : fontSize.base,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
marginTop: mobile ? "" : 10, marginTop: mobile ? "" : 10,
}} }}
@ -92,7 +92,7 @@ const ProductQuestion = ({ list, mobile }) => {
<Text <Text
style={[ style={[
{ {
fontSize: mobile ? fontSize.lg : fontSize.xl3, fontSize: mobile ? fontSize.sm : fontSize.xl3,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[colorScheme].green79,
fontFamily: "demi", fontFamily: "demi",
}, },

@ -85,7 +85,7 @@ const ProductReviews = ({ list, mobile }) => {
<Text <Text
style={[ style={[
{ {
fontSize: fontSize.lg, fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[colorScheme].green79,
fontFamily: "demi", fontFamily: "demi",
}, },

@ -26,7 +26,7 @@ const ProductSpecifications = ({ list, mobile }) => {
tw(`pr-2 ${mobile ? "py-3" : "py-4"}`), tw(`pr-2 ${mobile ? "py-3" : "py-4"}`),
{ {
fontFamily: "regular", fontFamily: "regular",
fontSize: mobile ? fontSize.tiny : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
color: "#07AFAF", color: "#07AFAF",
textAlign: ios ? "right" : "auto" textAlign: ios ? "right" : "auto"
}, },
@ -46,7 +46,7 @@ const ProductSpecifications = ({ list, mobile }) => {
tw("text-right"), tw("text-right"),
{ {
fontFamily: "regular", fontFamily: "regular",
fontSize: mobile ? fontSize.tiny : fontSize.base, fontSize: mobile ? fontSize.sm : fontSize.base,
color: "#646464", color: "#646464",
}, },
]} ]}
@ -73,7 +73,7 @@ const ProductSpecifications = ({ list, mobile }) => {
<Text <Text
style={[ style={[
{ {
fontSize: fontSize.lg, fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].green79 , color: Colors.theme1[colorScheme].green79 ,
fontFamily: "demi", fontFamily: "demi",
}, },

@ -67,8 +67,8 @@ function Blogs({ blogs, mobile }) {
tw("mb-2"), tw("mb-2"),
{ {
color: Colors.theme1[colorScheme].gray20, color: Colors.theme1[colorScheme].gray20,
fontFamily: "bold", fontFamily: "regular",
fontSize: mobile ? fontSize.tiny : fontSize.lg, fontSize: mobile ? fontSize.sm : fontSize.lg,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}, },
]} ]}
@ -86,7 +86,7 @@ function Blogs({ blogs, mobile }) {
{ {
color: Colors.theme1[colorScheme].gray20, color: Colors.theme1[colorScheme].gray20,
fontFamily: "regular", fontFamily: "regular",
fontSize: mobile ? fontSize.sm : fontSize.base, fontSize: mobile ? fontSize.xs : fontSize.base,
}, },
]} ]}
> >
@ -100,7 +100,7 @@ function Blogs({ blogs, mobile }) {
{ {
color: Colors.theme1[colorScheme].gray20, color: Colors.theme1[colorScheme].gray20,
fontFamily: "regular", fontFamily: "regular",
fontSize: mobile ? fontSize.sm : fontSize.base, fontSize: mobile ? fontSize.xs : fontSize.base,
}, },
]} ]}
> >

@ -2,7 +2,7 @@ import {
View, View,
Text, Text,
Image, Image,
TouchableOpacity, Pressable,
FlatList, FlatList,
Appearance, Appearance,
Platform, Platform,
@ -27,7 +27,7 @@ function MyBooks({ books, grades }) {
const Book = ({ book }) => { const Book = ({ book }) => {
const navigation = useNavigation(); const navigation = useNavigation();
return ( return (
<TouchableOpacity <Pressable
style={tw(`flex flex-col ml-3 ${ios ? "items-end" : ""}`)} style={tw(`flex flex-col ml-3 ${ios ? "items-end" : ""}`)}
onPress={() => {}} onPress={() => {}}
> >
@ -68,7 +68,7 @@ function MyBooks({ books, grades }) {
{"پایه" + " " + grades[book.product.book.gradeId]} {"پایه" + " " + grades[book.product.book.gradeId]}
</Text> </Text>
<Progress percent={60} alignItems={"items-end"} /> <Progress percent={60} alignItems={"items-end"} />
</TouchableOpacity> </Pressable>
); );
}; };

@ -2,7 +2,7 @@ import React from "react";
import { import {
View, View,
Image, Image,
TouchableOpacity, Pressable,
FlatList, FlatList,
Platform, Platform,
Dimensions Dimensions
@ -20,7 +20,7 @@ function Scroll({ books, mobile }) {
const Product = ({ book, position }) => { const Product = ({ book, position }) => {
const navigation = useNavigation(); const navigation = useNavigation();
return ( return (
<TouchableOpacity <Pressable
onPress={() => onPress={() =>
navigation.navigate("Product", { id: book?.id, type: "book" }) navigation.navigate("Product", { id: book?.id, type: "book" })
} }
@ -39,7 +39,7 @@ function Scroll({ books, mobile }) {
source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileIds}` }} source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileIds}` }}
style={{ width: "100%", height: "100%" }} style={{ width: "100%", height: "100%" }}
/> />
</TouchableOpacity> </Pressable>
); );
}; };
return ( return (
@ -69,6 +69,7 @@ function Scroll({ books, mobile }) {
data={[{ id: 0 }]} data={[{ id: 0 }]}
renderItem={({}) => <Box books={books} />} renderItem={({}) => <Box books={books} />}
keyExtractor={(item) => item.id} keyExtractor={(item) => item.id}
/> />
</View> </View>
); );

@ -2,7 +2,7 @@ import {
View, View,
Text, Text,
Image, Image,
TouchableOpacity, Pressable,
FlatList, FlatList,
Appearance, Appearance,
Platform Platform
@ -26,7 +26,7 @@ function Videos({ videos, grades, mobile }) {
const Video = ({ video }) => { const Video = ({ video }) => {
const navigation = useNavigation(); const navigation = useNavigation();
return ( return (
<TouchableOpacity <Pressable
style={tw(`flex flex-col ${mobile ? "ml-3" : "ml-5"}`)} style={tw(`flex flex-col ${mobile ? "ml-3" : "ml-5"}`)}
onPress={() => navigation.navigate("Video", { id: video.id })} onPress={() => navigation.navigate("Video", { id: video.id })}
> >
@ -46,7 +46,7 @@ function Videos({ videos, grades, mobile }) {
{ {
color: Colors.theme1[colorScheme].gray20, color: Colors.theme1[colorScheme].gray20,
fontFamily: "bold", fontFamily: "bold",
fontSize: mobile ? fontSize.base : fontSize.xl, fontSize: mobile ? fontSize.sm : fontSize.xl,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}, },
]} ]}
@ -59,15 +59,15 @@ function Videos({ videos, grades, mobile }) {
{ {
color: Colors.theme1[colorScheme].gray20, color: Colors.theme1[colorScheme].gray20,
fontFamily: "regular", fontFamily: "regular",
fontSize: mobile ? fontSize.tiny : fontSize.base, fontSize: mobile ? fontSize.xs : fontSize.base,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}, },
]} ]}
> >
{grades[video.gradeId]} {'پایه' + ' ' + grades[video.gradeId]}
</Text> </Text>
<Progress percent={60} alignItems={"items-end"} /> <Progress percent={60} alignItems={"items-end"} />
</TouchableOpacity> </Pressable>
); );
}; };
return ( return (

@ -89,7 +89,7 @@ const Home = ({
// Later on in your styles.. // Later on in your styles..
const styles = StyleSheet.create({ const styles = StyleSheet.create({
contentContainerStyle: { contentContainerStyle: {
paddingBottom: 100, paddingBottom: 40,
// flex : 1, // flex : 1,
// alignItems: "", // alignItems: "",
}, },

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -18,15 +18,26 @@ function Splash({ navigation, isLogin }) {
}, [isLogin]); }, [isLogin]);
return ( return (
<View style={{ justifyContent: "center", alignItems: "center", flex: 1 }}> <View
style={{
justifyContent: "center",
alignItems: "center",
flex: 1,
display: "flex",
}}
>
<View style={{ height: width * 0.7 * 2 / 3 }}>
<Image <Image
source={Logo} source={Logo}
resizeMode="contain"
style={{ style={{
width: width * 0.7, width: width * 0.7,
height: (width * 0.7) / 2.09, flex: 1,
}} }}
/> />
<ActivityIndicator size={"large"} style={{ marginTop: 20 }} /> </View>
<ActivityIndicator size={"large"} style={{ marginTop: 20}} />
</View> </View>
); );
} }

Loading…
Cancel
Save