wudebin 6 달 전
부모
커밋
c90674f3ae
6개의 변경된 파일219개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      Strides-SPAPP/babel.config.js
  2. 77 0
      Strides-SPAPP/index.js
  3. 3 0
      Strides-SPAPP/jest.config.js
  4. 11 0
      Strides-SPAPP/metro.config.js
  5. 117 0
      Strides-SPAPP/package.json
  6. 3 0
      Strides-SPAPP/tsconfig.json

+ 8 - 0
Strides-SPAPP/babel.config.js

@@ -0,0 +1,8 @@
+module.exports = {
+  presets: [
+    'module:@react-native/babel-preset',
+  ],
+  plugins: [
+    'react-native-reanimated/plugin',
+  ],
+};

+ 77 - 0
Strides-SPAPP/index.js

@@ -0,0 +1,77 @@
+/**
+ * 入口文件
+ * @邠心vbe on 2020/05/20
+ */
+import React, { Component } from 'react';
+import './app/i18n'
+import {AppRegistry, View} from 'react-native';
+import 'react-native-gesture-handler';
+import './app/utils/themes'
+import './app/utils/constant';
+import './app/utils/notification';
+import './app/utils/vector_icon';
+import Router from './app/pages/Router';
+import app from './app.json';
+import ModalPortal from './app/components/ModalPortal';
+import {RootSiblingParent} from 'react-native-root-siblings';
+import { SafeAreaInsetsContext, SafeAreaProvider } from 'react-native-safe-area-context';
+import MyStatusBar from './app/components/MyStatusBar';
+import { i18nUtil } from './app/i18n';
+import RouterV2 from './app/pages/RouterV2';
+
+class Index extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      visible: false,
+      refreshTime: 0,
+      navBottom: undefined
+    }
+  }
+
+  componentDidMount() {
+    i18nUtil.init(() => {
+      this.setState({
+        visible: true
+      })
+    })
+  }
+
+  init(insets) {
+    console.log("insets" + this.state.navBottom, insets)
+    if (this.state.navBottom == undefined) {
+      if (insets.top) {
+        global.statusHeight = insets.top
+      }
+      if (insets.bottom != undefined) {
+        global.navbarHeight = insets.bottom
+        this.setState({
+          navBottom: insets.bottom
+        })
+      }
+    }
+  }
+
+  render() {
+    return (
+      <SafeAreaProvider>
+        <RootSiblingParent>
+          <MyStatusBar/>
+          { this.state.visible 
+            ? (app.isLumiWhitelabel ? <RouterV2/> : <Router/>)
+            : <></>
+          }
+          <ModalPortal/>
+          { this.state.navBottom != undefined
+          ? <View style={{height: isIOS ? 0 : this.state.navBottom, backgroundColor: colorAccent}}></View>
+          : <SafeAreaInsetsContext.Consumer>
+              {insets => this.init(insets)}
+            </SafeAreaInsetsContext.Consumer>
+          }
+        </RootSiblingParent>
+      </SafeAreaProvider>
+    );
+  }
+};
+
+AppRegistry.registerComponent(app.name, () => Index);

+ 3 - 0
Strides-SPAPP/jest.config.js

@@ -0,0 +1,3 @@
+module.exports = {
+  preset: 'react-native',
+};

+ 11 - 0
Strides-SPAPP/metro.config.js

@@ -0,0 +1,11 @@
+const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
+
+/**
+ * Metro configuration
+ * https://reactnative.dev/docs/metro
+ *
+ * @type {import('@react-native/metro-config').MetroConfig}
+ */
+const config = {};
+
+module.exports = mergeConfig(getDefaultConfig(__dirname), config);

+ 117 - 0
Strides-SPAPP/package.json

@@ -0,0 +1,117 @@
+{
+  "name": "strides",
+  "version": "4.0.0",
+  "license": "MIT",
+  "private": true,
+  "scripts": {
+    "android": "react-native run-android",
+    "ios": "react-native run-ios --simulator='iPhone 15 Pro'",
+    "start": "react-native start",
+    "test": "jest",
+    "lint": "eslint .",
+    "release": "npx react-native run-android --variant=release",
+    "bundle": "cd android & ./gradlew bundleRelease",
+    "build:android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle --assets-dest android/app/build/generated/res/createBundleReleaseJsAndAssets/",
+    "build:ios": "react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/bundle/main.jsbundle --assets-dest ios/bundle ",
+    "clean": "cd android & ./gradlew clean",
+    "apk": "cd android & ./gradlew assembleRelease",
+    "reset": "react-native start --reset-cache",
+    "postinstall": "patch-package"
+  },
+  "dependencies": {
+    "@react-native-async-storage/async-storage": "2.0.0",
+    "@react-native-camera-roll/camera-roll": "7.9.0",
+    "@react-native-clipboard/clipboard": "1.16.3",
+    "@react-native-community/checkbox": "0.5.20",
+    "@react-native-community/geolocation": "3.4.0",
+    "@react-native-community/push-notification-ios": "1.11.0",
+    "@react-native-masked-view/masked-view": "0.3.0",
+    "@react-native-vector-icons": "https://gitee.com/vbes/react-native-vector-icons.git",
+    "@react-native-vector-icons/ant-design": "file:node_modules/@react-native-vector-icons/ant-design",
+    "@react-native-vector-icons/common": "file:node_modules/@react-native-vector-icons/common",
+    "@react-native-vector-icons/entypo": "file:node_modules/@react-native-vector-icons/entypo",
+    "@react-native-vector-icons/evil-icons": "file:node_modules/@react-native-vector-icons/evil-icons",
+    "@react-native-vector-icons/feather": "file:node_modules/@react-native-vector-icons/feather",
+    "@react-native-vector-icons/fontawesome": "file:node_modules/@react-native-vector-icons/fontawesome",
+    "@react-native-vector-icons/fontawesome-common": "file:node_modules/@react-native-vector-icons/fontawesome-common",
+    "@react-native-vector-icons/fontawesome5": "file:node_modules/@react-native-vector-icons/fontawesome5",
+    "@react-native-vector-icons/fontawesome6": "file:node_modules/@react-native-vector-icons/fontawesome6",
+    "@react-native-vector-icons/fontisto": "file:node_modules/@react-native-vector-icons/fontisto",
+    "@react-native-vector-icons/ionicons": "file:node_modules/@react-native-vector-icons/ionicons",
+    "@react-native-vector-icons/lucide": "file:node_modules/@react-native-vector-icons/lucide",
+    "@react-native-vector-icons/material-design-icons": "file:node_modules/@react-native-vector-icons/material-design-icons",
+    "@react-native-vector-icons/material-icons": "file:node_modules/@react-native-vector-icons/material-icons",
+    "@react-native-vector-icons/octicons": "file:node_modules/@react-native-vector-icons/octicons",
+    "@react-native-vector-icons/zocial": "file:node_modules/@react-native-vector-icons/zocial",
+    "@react-navigation/drawer": "7.1.1",
+    "@react-navigation/material-top-tabs": "7.1.0",
+    "@react-navigation/native": "7.1.14",
+    "@react-navigation/stack": "7.4.2",
+    "axios": "1.7.9",
+    "react": "18.3.1",
+    "react-native": "0.77.0",
+    "react-native-device-info": "14.0.4",
+    "react-native-gesture-handler": "^2.22.0",
+    "react-native-i18n": "https://gitee.com/vbes/react-native-i18n.git",
+    "react-native-image-crop-picker": "0.41.6",
+    "react-native-linear-gradient": "2.8.3",
+    "react-native-location-enabler": "https://gitee.com/vbes/react-native-location-enabler.git",
+    "react-native-map-clustering": "3.4.2",
+    "react-native-map-link": "2.11.2",
+    "react-native-maps": "1.24.16",
+    "react-native-modal": "13.0.2",
+    "react-native-modal-datetime-picker": "^18.0.0",
+    "react-native-pager-view": "6.5.1",
+    "react-native-permissions": "5.4.0",
+    "react-native-progress": "5.0.1",
+    "react-native-push-notification": "8.1.1",
+    "react-native-reanimated": "3.16.7",
+    "react-native-reanimated-skeleton": "^1.6.0",
+    "react-native-root-siblings": "5.0.1",
+    "react-native-root-toast": "3.6.0",
+    "react-native-safe-area-context": "5.1.0",
+    "react-native-screens": "4.5.0",
+    "react-native-svg": "15.11.1",
+    "react-native-swiper": "1.6.0",
+    "react-native-tab-view": "4.0.5",
+    "react-native-view-shot": "4.0.0",
+    "react-native-vision-camera": "4.6.4",
+    "react-native-web": "0.19.13",
+    "react-native-webview": "13.15.0",
+    "vbe-cluster-map": "https://gitee.com/vbes/vbe-cluster-map.git",
+    "victory-native": "37.3.2"
+  },
+  "devDependencies": {
+    "@babel/core": "^7.25.2",
+    "@babel/preset-env": "^7.25.3",
+    "@babel/runtime": "^7.25.0",
+    "@react-native-community/cli": "15.0.1",
+    "@react-native-community/cli-platform-android": "15.0.1",
+    "@react-native-community/cli-platform-ios": "15.0.1",
+    "@react-native/babel-preset": "0.77.0",
+    "@react-native/eslint-config": "0.77.0",
+    "@react-native/metro-config": "0.77.0",
+    "@react-native/typescript-config": "0.77.0",
+    "@types/jest": "^29.5.13",
+    "@types/react": "^18.2.6",
+    "@types/react-test-renderer": "^18.0.0",
+    "eslint": "^8.19.0",
+    "jest": "^29.6.3",
+    "patch-package": "^8.0.0",
+    "postinstall-postinstall": "^2.1.0",
+    "prettier": "2.8.8",
+    "react-test-renderer": "18.3.1",
+    "typescript": "5.0.4"
+  },
+  "resolutions": {
+    "react-native-permissions": "5.4.0"
+  },
+  "overrides": {},
+  "engines": {
+    "node": ">=18"
+  },
+  "packageManager": "yarn@3.6.4",
+  "jest": {
+    "preset": "react-native"
+  }
+}

+ 3 - 0
Strides-SPAPP/tsconfig.json

@@ -0,0 +1,3 @@
+{
+  "extends": "@react-native/typescript-config/tsconfig.json",
+}