Add IMS Token.

This commit is contained in:
Patrick Fic
2022-05-12 16:32:28 -07:00
parent 451950883a
commit 577eaf55ee
6 changed files with 24 additions and 19 deletions

View File

@@ -4,19 +4,19 @@
"slug": "imexmobile", "slug": "imexmobile",
"version": "1.3.5", "version": "1.3.5",
"extra": { "extra": {
"expover": "1" "expover": "2"
}, },
"orientation": "default", "orientation": "default",
"icon": "./assets/logo192noa.png", "icon": "./assets/logo192noa.png",
"ios": { "ios": {
"supportsTablet": true, "supportsTablet": true,
"bundleIdentifier": "com.imex.imexmobile", "bundleIdentifier": "com.imex.imexmobile",
"buildNumber": "1", "buildNumber": "2",
"googleServicesFile": "./GoogleService-Info.plist" "googleServicesFile": "./GoogleService-Info.plist"
}, },
"android": { "android": {
"package": "com.imex.imexmobile", "package": "com.imex.imexmobile",
"versionCode": 1100001, "versionCode": 1100002,
"googleServicesFile": "./google-services.json" "googleServicesFile": "./google-services.json"
}, },
"splash": { "splash": {

View File

@@ -4,12 +4,11 @@
}, },
"build": { "build": {
"test": { "test": {
"developmentClient": true,
"distribution": "internal",
"releaseChannel": "test" "releaseChannel": "test"
}, },
"production": { "production": {
"release-channel": "production" "releaseChannel": "production",
"env": { "ANDROID_SDK_ROOT": "/Users/pfic/Library/Android/sdk" }
} }
}, },
"submit": { "submit": {

View File

@@ -10,6 +10,7 @@ export const QUERY_BODYSHOP = gql`
localmediaserverhttp localmediaserverhttp
shopname shopname
features features
localmediatoken
} }
} }
`; `;

View File

@@ -9,7 +9,9 @@
"release:test": "expo publish --release-channel test", "release:test": "expo publish --release-channel test",
"release:production": "expo publish --release-channel production", "release:production": "expo publish --release-channel production",
"build:production": "eas build --profile production", "build:production": "eas build --profile production",
"build:test": "eas build --profile test" "build:test": "eas build --profile test",
"build:test:local:ios": "eas build --profile test --platform ios --local",
"build:test:local:android": "eas build --profile test --platform android --local"
}, },
"dependencies": { "dependencies": {
"@apollo/client": "^3.7.0-alpha.3", "@apollo/client": "^3.7.0-alpha.3",
@@ -52,7 +54,7 @@
"react": "17.0.2", "react": "17.0.2",
"react-dom": "17.0.2", "react-dom": "17.0.2",
"react-i18next": "^11.15.5", "react-i18next": "^11.15.5",
"react-native": "0.68.1", "react-native": "0.68.2",
"react-native-gesture-handler": "~2.2.1", "react-native-gesture-handler": "~2.2.1",
"react-native-image-gallery": "^2.1.5", "react-native-image-gallery": "^2.1.5",
"react-native-indicators": "^0.17.0", "react-native-indicators": "^0.17.0",

View File

@@ -7,9 +7,13 @@ import * as ImageManipulator from "expo-image-manipulator";
export const handleLocalUpload = async ({ ev, context }) => { export const handleLocalUpload = async ({ ev, context }) => {
const { onError, onSuccess, onProgress, filename, mediaId } = ev; const { onError, onSuccess, onProgress, filename, mediaId } = ev;
const { jobid, invoice_number, vendorid, callbackAfterUpload } = context; const { jobid, invoice_number, vendorid, callbackAfterUpload } = context;
const bodyshop = store.getState().user.bodyshop;
var options = { var options = {
headers: { "X-Requested-With": "XMLHttpRequest" }, headers: {
"X-Requested-With": "XMLHttpRequest",
ims_token: bodyshop.localmediatoken,
},
onUploadProgress: (e) => { onUploadProgress: (e) => {
if (onProgress) onProgress({ percent: (e.loaded / e.total) * 100 }); if (onProgress) onProgress({ percent: (e.loaded / e.total) * 100 });
}, },
@@ -57,7 +61,6 @@ export const handleLocalUpload = async ({ ev, context }) => {
} }
formData.append("file", fileData); formData.append("file", fileData);
const bodyshop = store.getState().user.bodyshop;
try { try {
const imexMediaServerResponse = await axios.post( const imexMediaServerResponse = await axios.post(

View File

@@ -7604,10 +7604,10 @@ react-mixin@^3.0.5:
object-assign "^4.0.1" object-assign "^4.0.1"
smart-mixin "^2.0.0" smart-mixin "^2.0.0"
react-native-codegen@^0.0.13: react-native-codegen@^0.0.17:
version "0.0.13" version "0.0.17"
resolved "https://registry.yarnpkg.com/react-native-codegen/-/react-native-codegen-0.0.13.tgz#4cc94546fc75a5dbe9350d59c10108f2efe6bc17" resolved "https://registry.yarnpkg.com/react-native-codegen/-/react-native-codegen-0.0.17.tgz#83fb814d94061cbd46667f510d2ddba35ffb50ac"
integrity sha512-rCh1P+s0Q4N6vNgS97ckafbhJRztz22+0l0VZoyQC06F07J98kI5cUByH0ATypPRIdpkMbAZc59DoPdDFc01bg== integrity sha512-7GIEUmAemH9uWwB6iYXNNsPoPgH06pxzGRmdBzK98TgFBdYJZ7CBuZFPMe4jmHQTPOkQazKZ/w5O6/71JBixmw==
dependencies: dependencies:
"@babel/parser" "^7.14.0" "@babel/parser" "^7.14.0"
flow-parser "^0.121.0" flow-parser "^0.121.0"
@@ -7721,10 +7721,10 @@ react-native-web@0.17.7:
normalize-css-color "^1.0.2" normalize-css-color "^1.0.2"
prop-types "^15.6.0" prop-types "^15.6.0"
react-native@0.68.1: react-native@0.68.2:
version "0.68.1" version "0.68.2"
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.68.1.tgz#c3d92f89028cdc2453fe7cd2d532b3f68d1c27c8" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.68.2.tgz#07547cd31bb9335a7fa4135cfbdc24e067142585"
integrity sha512-5gfvslo5NO2Ece2k/q41eVOK3ca4u1QAOf+qM+auvOiUA4/QR5Yr0WfSGbRpUr2GaFgv7qP11F4+elCravg7uQ== integrity sha512-qNMz+mdIirCEmlrhapAtAG+SWVx6MAiSfCbFNhfHqiqu1xw1OKXdzIrjaBEPihRC2pcORCoCHduHGQe/Pz9Yuw==
dependencies: dependencies:
"@jest/create-cache-key-function" "^27.0.1" "@jest/create-cache-key-function" "^27.0.1"
"@react-native-community/cli" "^7.0.3" "@react-native-community/cli" "^7.0.3"
@@ -7748,7 +7748,7 @@ react-native@0.68.1:
pretty-format "^26.5.2" pretty-format "^26.5.2"
promise "^8.0.3" promise "^8.0.3"
react-devtools-core "^4.23.0" react-devtools-core "^4.23.0"
react-native-codegen "^0.0.13" react-native-codegen "^0.0.17"
react-native-gradle-plugin "^0.0.6" react-native-gradle-plugin "^0.0.6"
react-refresh "^0.4.0" react-refresh "^0.4.0"
react-shallow-renderer "16.14.1" react-shallow-renderer "16.14.1"