reza fixed something

master
Reza_ashrafi 2 years ago
parent 64773078ed
commit 5c61fe6ff9
  1. 6
      src/components/Navbar.js
  2. 2
      src/redux/reducers/public.js
  3. 4
      src/screens/Activation/index.js
  4. 2
      src/screens/Address/index.js
  5. 2
      src/screens/Profile/components/MyCourses/index.js
  6. 12
      src/screens/Profile/components/Trophy.js
  7. 3
      src/screens/Profile/components/User.js
  8. 2
      src/screens/Profile/index.js
  9. 35
      src/screens/VideoDisplay/components/Season/index.js
  10. 2
      src/screens/VideoDisplay/index.js
  11. 4
      src/screens/Videos/index.js

@ -477,7 +477,11 @@ const Navbar = ({
) )
) : null} ) : null}
{headerOptions?.menu ? ( {headerOptions?.menu ? (
<Entypo name="dots-three-vertical" size={24} color="#52796F" /> <Entypo
name="dots-three-vertical"
size={24}
color={theme === "light" ? "#52796F" : Colors.theme1.white}
/>
) : null} ) : null}
</View> </View>
</View> </View>

@ -18,7 +18,7 @@ const initialState = {
provinces: [], provinces: [],
cities: [], cities: [],
province: ["استان"], province: ["استان"],
city: ["شهر"], city: ["شهرستان"],
departmans: [ departmans: [
{ {
id: 0, id: 0,

@ -36,7 +36,7 @@ const ios = Platform.OS === "ios";
const { height } = Dimensions.get("window"); const { height } = Dimensions.get("window");
function Activation({ add, mobile, theme, route }) { function Activation({ add, mobile, theme, route }) {
const [value, setValue] = useState(null); const [value, setValue] = useState(route?.params?.data || "");
const navigation = useNavigation(); const navigation = useNavigation();
const insets = useSafeAreaInsets(); const insets = useSafeAreaInsets();
@ -113,7 +113,7 @@ function Activation({ add, mobile, theme, route }) {
: Colors.theme1.white, : Colors.theme1.white,
}, },
]} ]}
value={value || route?.params?.data} value={value}
onChangeText={(value) => onChangeText={(value) =>
setValue( setValue(
(value = onInput.englishAndNumberWithoutSpace(value)) (value = onInput.englishAndNumberWithoutSpace(value))

@ -410,7 +410,7 @@ const Address = ({
: city[0] : city[0]
} }
onChange={(name, value) => onChange={(name, value) =>
value === "شهر" ? {} : onChange(name, value) value === "شهرستان" ? {} : onChange(name, value)
} }
options={city} options={city}
width={"100%"} width={"100%"}

@ -63,7 +63,7 @@ const ProfileBookmark = ({ myCourses = [], mobile, theme }) => {
<Empty <Empty
text="هیچ دوره ویدئویی وجود ندارد." text="هیچ دوره ویدئویی وجود ندارد."
buttonText={"رفتن به فروشگاه"} buttonText={"رفتن به فروشگاه"}
buttonAction={() => navigation.push("Products")} buttonAction={() => navigation.navigate("VOD")}
/> />
)} )}
</SafeAreaView> </SafeAreaView>

@ -2,6 +2,7 @@ import { View, Text, Platform, Pressable } from "react-native";
import React from "react"; import React from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import Svg, { G, Path } from "react-native-svg"; import Svg, { G, Path } from "react-native-svg";
import {asyncAwesomeAlert} from "../../../utils/AsyncWrappers";
//style //style
import tw from "tailwind-rn"; import tw from "tailwind-rn";
@ -61,10 +62,17 @@ const Trophy = ({ theme }) => {
theme === "light" ? Colors.theme1.green79 : Colors.theme1.yellow2, theme === "light" ? Colors.theme1.green79 : Colors.theme1.yellow2,
}} }}
> >
{"امتیاز شما" + " " + 14560} {"امتیاز شما" + " " + 0}
</Text> </Text>
</View> </View>
<Pressable> <Pressable
onPress={() =>
asyncAwesomeAlert("نتیجه", "این قابلیت در حال توسعه است.", {
confirmText : 'باشه',
showCancelButton: false,
})
}
>
<Text <Text
style={{ style={{
fontFamily: "light", fontFamily: "light",

@ -85,7 +85,8 @@ const User = ({ user, mobile, theme }) => {
<Pressable <Pressable
style={tw(`flex w-full ${mobile ? "mt-0" : "mt-4"}`)} style={tw(`flex w-full ${mobile ? "mt-0" : "mt-4"}`)}
onPress={() => onPress={() =>
asyncAwesomeAlert("نتیجه", "این قابلیت در حال توسعه است.", { asyncAwesomeAlert("", "این قابلیت در حال توسعه است.", {
confirmText : 'باشه',
showCancelButton: false, showCancelButton: false,
}) })
} }

@ -65,7 +65,7 @@ function Profile({ mobile, theme, logout, loading }) {
style={styles.container} style={styles.container}
> >
<User /> <User />
{/* <Trophy /> */} <Trophy />
<List /> <List />
<Pressable <Pressable
style={tw(`flex w-full ${mobile ? "mt-0" : "mt-4"}`)} style={tw(`flex w-full ${mobile ? "mt-0" : "mt-4"}`)}

@ -23,7 +23,14 @@ const duration = (value) => {
); );
}; };
const Season = ({ season, activeUnit, name, setVideoActive, mobile, theme }) => { const Season = ({
season,
activeUnit,
name,
setVideoActive,
mobile,
theme,
}) => {
const navigation = useNavigation(); const navigation = useNavigation();
const Unit = ({ unit }) => { const Unit = ({ unit }) => {
@ -38,13 +45,17 @@ const Season = ({ season, activeUnit, name, setVideoActive, mobile, theme }) =>
return ( return (
<View <View
style={[ style={[
tw(`w-full flex rounded-md overflow-hidden ${mobile ? "mb-3" : "mb-5"}`), tw(
`w-full flex rounded-md overflow-hidden ${
mobile ? "mb-5" : "mb-5"
}`
),
{ {
borderWidth: 1, borderWidth: 1,
borderColor: Colors.theme1.greenD9, borderColor: Colors.theme1.greenD9,
backgroundColor: backgroundColor:
activeUnit === unit activeUnit === unit
? Colors.theme1.greenCF ? Colors.theme1.greenCF + (theme === "light" ? "" : "aa")
: "transparent", : "transparent",
}, },
]} ]}
@ -68,7 +79,9 @@ const Season = ({ season, activeUnit, name, setVideoActive, mobile, theme }) =>
color: color:
activeUnit === unit activeUnit === unit
? "white" ? "white"
: Colors.theme1.green79, : theme === "light"
? Colors.theme1.green79
: Colors.theme1.white,
}, },
]} ]}
> >
@ -82,12 +95,16 @@ const Season = ({ season, activeUnit, name, setVideoActive, mobile, theme }) =>
color: color:
activeUnit === unit activeUnit === unit
? "white" ? "white"
: Colors.theme1.green79, : theme === "light"
? Colors.theme1.green79
: Colors.theme1.white,
borderRightWidth: 1, borderRightWidth: 1,
borderColor: borderColor:
activeUnit === unit activeUnit === unit
? "white" ? "white"
: Colors.theme1.green79, : theme === "light"
? Colors.theme1.green79
: Colors.theme1.white,
paddingRight: 8, paddingRight: 8,
}, },
]} ]}
@ -109,7 +126,9 @@ const Season = ({ season, activeUnit, name, setVideoActive, mobile, theme }) =>
color: color:
activeUnit === unit activeUnit === unit
? "white" ? "white"
: Colors.theme1.green79, : theme === "light"
? Colors.theme1.green79
: Colors.theme1.white,
}} }}
> >
نمایش نمایش
@ -134,7 +153,7 @@ const mapStateToProps = (state) => ({
vods: state.publicApi.bookSection?.vods, vods: state.publicApi.bookSection?.vods,
userid: state.user.status?.id, userid: state.user.status?.id,
mobile: state.publicApi.mobile, mobile: state.publicApi.mobile,
theme: state.publicApi.theme theme: state.publicApi.theme,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {

@ -66,7 +66,7 @@ function VideoDisplay({ route, mobile, theme }) {
<ScrollView <ScrollView
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={styles.container} style={styles.container}
onLayout={() => video.current.presentFullscreenPlayer()} onLayout={() => setWidth(Dimensions.get("window").width)}
> >
{!mobile ? <View style={tw("mt-5")}></View> : null} {!mobile ? <View style={tw("mt-5")}></View> : null}
<View style={tw("flex ")}> <View style={tw("flex ")}>

@ -62,11 +62,11 @@ function Videos({ grades, videos, getVideos, mobile }) {
style={[styles.container]} style={[styles.container]}
> >
{!mobile ? <View style={tw("mt-5")}></View> : null} {!mobile ? <View style={tw("mt-5")}></View> : null}
<Search {/* <Search
value={search} value={search}
onChange={setSearch} onChange={setSearch}
placeholder={"نام کتاب یا دوره را جستجو کنید"} placeholder={"نام کتاب یا دوره را جستجو کنید"}
/> /> */}
{/* <Divider type={"vertical"} /> */} {/* <Divider type={"vertical"} /> */}
{videos.length ? ( {videos.length ? (
<> <>

Loading…
Cancel
Save