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": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.appsazz.RnDanovinExpo"
@ -32,6 +30,14 @@
"web": {
"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) => {
try {
console.log(url.split("/")[0] === 'file');
dispatch = dispatch || (() => {});
dispatch({ type: url.split("/")[0] + "/" + "loading" });
let response = await fetch();
if(url.split("/")[0] === 'file'){
console.log('response');
console.log(response);
}
// console.log(response);
switch (response.status) {
case 200:
@ -84,7 +89,7 @@ class Proxy {
});
}
return false;
} catch (error) {}
} catch (error) {console.log(error)}
};
refresh = () => {

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

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

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

@ -21,11 +21,14 @@ import Drawer from "../../components/Drawer";
import Season from "./components/Season";
import Divider from "../../components/Divider";
//assets
//style
import tw from "tailwind-rn";
import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
//assets
import posterImage from "../../assets/images/logo.png";
const ios = Platform.OS === "ios";
function VideoDisplay({ route, mobile, theme }) {
@ -84,13 +87,36 @@ function VideoDisplay({ route, mobile, theme }) {
<View style={tw("flex ")}>
<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={{
uri: `https://dnvn.ir/api/v1/file/${route.params.unit?.fileIds}`,
}}
useNativeControls
resizeMode="contain"
onFullscreenUpdate={onFullscreenUpdate}
usePoster={true}
posterSource={posterImage}
posterStyle={{
width: "50%",
height: "50%",
marginLeft : "25%",
marginTop : "15%",
zIndex : 0,
}}
/>
<Text
style={{

Loading…
Cancel
Save