update 7 files

master
Reza_ashrafi 2 years ago
parent b96f686440
commit 53be7eb7ef
  1. 14
      app.json
  2. BIN
      src/assets/images/poster.png
  3. 7
      src/redux/proxy.js
  4. 60
      src/screens/Address/index.js
  5. 2
      src/screens/Product/components/Book.js
  6. 1
      src/screens/Profile/components/User.js
  7. 3
      src/screens/ShoppingCart/index.js
  8. 30
      src/screens/VideoDisplay/index.js

@ -15,9 +15,7 @@
"updates": { "updates": {
"fallbackToCacheTimeout": 0 "fallbackToCacheTimeout": 0
}, },
"assetBundlePatterns": [ "assetBundlePatterns": ["**/*"],
"**/*"
],
"ios": { "ios": {
"supportsTablet": true, "supportsTablet": true,
"bundleIdentifier": "com.appsazz.RnDanovinExpo" "bundleIdentifier": "com.appsazz.RnDanovinExpo"
@ -32,6 +30,14 @@
"web": { "web": {
"favicon": "" "favicon": ""
}, },
"description": "" "description": "",
"plugins": [
[
"expo-image-picker",
{
"photosPermission": "photosPermission"
}
]
]
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

@ -57,9 +57,14 @@ class Proxy {
check = async (url, { dispatch }, fetch, params) => { check = async (url, { dispatch }, fetch, params) => {
try { try {
console.log(url.split("/")[0] === 'file');
dispatch = dispatch || (() => {}); dispatch = dispatch || (() => {});
dispatch({ type: url.split("/")[0] + "/" + "loading" }); dispatch({ type: url.split("/")[0] + "/" + "loading" });
let response = await fetch(); let response = await fetch();
if(url.split("/")[0] === 'file'){
console.log('response');
console.log(response);
}
// console.log(response); // console.log(response);
switch (response.status) { switch (response.status) {
case 200: case 200:
@ -84,7 +89,7 @@ class Proxy {
}); });
} }
return false; return false;
} catch (error) {} } catch (error) {console.log(error)}
}; };
refresh = () => { refresh = () => {

@ -152,18 +152,18 @@ const Address = ({
id, id,
} = addressFields; } = addressFields;
if (!firstName) { // if (!firstName) {
return asyncAwesomeAlert("خطا", "نام خود را وارد کنید.", { // return asyncAwesomeAlert("خطا", "نام خود را وارد کنید.", {
showCancelButton: false, // showCancelButton: false,
confirmText: "باشه", // confirmText: "باشه",
}); // });
} // }
if (!lastName) { // if (!lastName) {
return asyncAwesomeAlert("خطا", "نام خانوادگی خود را وارد کنید", { // return asyncAwesomeAlert("خطا", "نام خانوادگی خود را وارد کنید", {
showCancelButton: false, // showCancelButton: false,
confirmText: "باشه", // confirmText: "باشه",
}); // });
} // }
if (!cellphone) { if (!cellphone) {
return asyncAwesomeAlert("خطا", "شماره موبایل خود را وارد کنید.", { return asyncAwesomeAlert("خطا", "شماره موبایل خود را وارد کنید.", {
showCancelButton: false, showCancelButton: false,
@ -192,23 +192,23 @@ const Address = ({
} }
} }
if (!phone) { // if (!phone) {
return asyncAwesomeAlert("خطا", "شماره تلفن خود را وارد کنید.", { // return asyncAwesomeAlert("خطا", "شماره تلفن خود را وارد کنید.", {
showCancelButton: false, // showCancelButton: false,
confirmText: "باشه", // confirmText: "باشه",
}); // });
} else { // } else {
if (phone.slice(0, 1) !== "0") { // if (phone.slice(0, 1) !== "0") {
return asyncAwesomeAlert( // return asyncAwesomeAlert(
"خطا", // "خطا",
"فرمت شماره تلفن وارد شده اشتباه است.", // "فرمت شماره تلفن وارد شده اشتباه است.",
{ // {
showCancelButton: false, // showCancelButton: false,
confirmText: "باشه", // confirmText: "باشه",
} // }
); // );
} // }
} // }
if (!provinceId) { if (!provinceId) {
return asyncAwesomeAlert("خطا", "نام استان خود را وارد کنید.", { return asyncAwesomeAlert("خطا", "نام استان خود را وارد کنید.", {
@ -229,7 +229,7 @@ const Address = ({
}); });
} else { } else {
if (postalCode.length !== 10) { if (postalCode.length !== 10) {
return asyncAwesomeAlert("خطا", "کد ملی میبایست ده رقم باشد.", { return asyncAwesomeAlert("خطا", "کد پستی میبایست ده رقم باشد.", {
showCancelButton: false, showCancelButton: false,
confirmText: "باشه", confirmText: "باشه",
}); });

@ -92,7 +92,7 @@ function Book({
const addToCart = React.useCallback( const addToCart = React.useCallback(
async (action, type) => { async (action, type) => {
setWhichTypeAdded(type); setWhichTypeAdded(type);
await action(); action();
}, },
[book, userId] [book, userId]
); );

@ -20,6 +20,7 @@ const { width } = Dimensions.get("window");
const User = ({ user, mobile, theme, upload }) => { const User = ({ user, mobile, theme, upload }) => {
const [dropdown, setDropdown] = React.useState(true); const [dropdown, setDropdown] = React.useState(true);
const [image, setImage] = React.useState(null); const [image, setImage] = React.useState(null);
const [status, requestPermission] = ImagePicker.useMediaLibraryPermissions();
const navigation = useNavigation(); const navigation = useNavigation();
const pickImage = React.useCallback(async () => { const pickImage = React.useCallback(async () => {

@ -221,8 +221,9 @@ function ShoppingCart({
}, },
]} ]}
> >
{isEmpty ? 0 : separate(factorInfo?.payPrice - factorInfo?.transportPrice)} {isEmpty ? 0 : separate(factorInfo?.payPrice)}
</Text> </Text>
<Text <Text
style={[ style={[
{ {

@ -21,11 +21,14 @@ import Drawer from "../../components/Drawer";
import Season from "./components/Season"; import Season from "./components/Season";
import Divider from "../../components/Divider"; import Divider from "../../components/Divider";
//assets //style
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import fontSize from "../../constants/fontSize"; import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors"; import Colors from "../../constants/Colors";
//assets
import posterImage from "../../assets/images/logo.png";
const ios = Platform.OS === "ios"; const ios = Platform.OS === "ios";
function VideoDisplay({ route, mobile, theme }) { function VideoDisplay({ route, mobile, theme }) {
@ -84,13 +87,36 @@ function VideoDisplay({ route, mobile, theme }) {
<View style={tw("flex ")}> <View style={tw("flex ")}>
<Video <Video
ref={video} ref={video}
style={{ width: "100%", height: (width * 9) / 16 - 16 }} style={{
width: "100%",
height: (width * 3) / 4.57 - 16,
borderWidth: 1,
borderColor:
theme === "light"
? Colors.theme1.gray2077 + "66"
: Colors.theme1.white + "55",
shadowColor: "#00000055",
shadowOffset: { width: 0, height: 1 },
shadowOpacity: 0.8,
shadowRadius: 2,
elevation: 5,
zIndex : 100,
}}
source={{ source={{
uri: `https://dnvn.ir/api/v1/file/${route.params.unit?.fileIds}`, uri: `https://dnvn.ir/api/v1/file/${route.params.unit?.fileIds}`,
}} }}
useNativeControls useNativeControls
resizeMode="contain" resizeMode="contain"
onFullscreenUpdate={onFullscreenUpdate} onFullscreenUpdate={onFullscreenUpdate}
usePoster={true}
posterSource={posterImage}
posterStyle={{
width: "50%",
height: "50%",
marginLeft : "25%",
marginTop : "15%",
zIndex : 0,
}}
/> />
<Text <Text
style={{ style={{

Loading…
Cancel
Save