diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..39c3d24 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) NJUCSE17 and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..16495ca --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# JB-App + +Mobile application of [JB-Online](https://github.com/NJUCSE17/JB-Online). Built with React Native and Expo. + +Legacy (Java) version of this app can be found at [JB-App-Legacy](https://github.com/NJUCSE17/JB-App-Legacy), but it is no longer maintained. + +## Getting Started + +### Project Structure + +``` ++-assets -> Save fonts and images +|-components -> Reusable single components +|-constants -> Theme, style and other constants +|-navigation -> Routes and navigation config +|-screens -> Screens of navigation +|-services -> API and its config +|-App.js -> Main entrance of this app +`-app.json -> APP related config +``` + +### Run, Test and Build + +- Please use yarn instead of npm as package manager. +- Run `yarn start` or `expo start` to start development server. +- Keep `/services/config.json` excluded from git. +- Run `expo build:[platform]` to build a standalone app. + +References: + +- [React Native documentation](https://facebook.github.io/react-native/docs/getting-started.html) +- [Expo documentation](https://docs.expo.io/) +- [Native Base documentation](https://docs.nativebase.io) + +### JavaScript is Bad! + +You can use TypeScript instead. We are considering changing all JS files to TS. + +## License and Credit + +JB-App is MIT licensed. + +Credits to + +- [Axios](https://github.com/axios/axios) +- [Expo](https://expo.io) and Expo SDK +- [js-base64](https://github.com/dankogai/js-base64) by dankogai +- [Native Base](https://github.com/GeekyAnts/NativeBase) by GeekyAnts +- [qs](https://github.com/ljharb/qs) by ljharb +- [React Native](https://github.com/facebook/react-native) by Facebook +- Icon from FlatIcon and FontAwesome \ No newline at end of file diff --git a/app.json b/app.json index 64b85e6..f237570 100644 --- a/app.json +++ b/app.json @@ -8,7 +8,7 @@ "ios", "android" ], - "version": "0.2.2", + "version": "0.2.3", "orientation": "portrait", "icon": "./assets/images/icon.png", "splash": { diff --git a/package.json b/package.json index cb92672..416f85d 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "expo": "^32.0.0", "js-base64": "^2.5.1", "native-base": "^2.12.0", - "querystring": "^0.2.0", + "qs": "^6.6.0", "react": "16.5.0", "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz", "react-native-htmlview": "^0.13.0", diff --git a/services/api.js b/services/api.js index e0a7976..f9eda5b 100644 --- a/services/api.js +++ b/services/api.js @@ -1,7 +1,7 @@ import axios from 'axios'; import { Alert, AsyncStorage } from 'react-native'; import { Constants } from 'expo'; -import { stringify } from 'querystring'; +import { stringify } from 'qs'; import { Base64 } from 'js-base64'; import * as Config from './config'; diff --git a/yarn.lock b/yarn.lock index 35c7fba..df3a7a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5649,7 +5649,7 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "http://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha1-tYsBCsQMIsVldhbI0sLALHv0eew= -qs@^6.5.0: +qs@^6.5.0, qs@^6.6.0: version "6.6.0" resolved "http://registry.npm.taobao.org/qs/download/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2" integrity sha1-qZwPaajSa/fvAS+HHNq7Cu5EJMI= @@ -5667,11 +5667,6 @@ query-string@^6.2.0: decode-uri-component "^0.2.0" strict-uri-encode "^2.0.0" -querystring@^0.2.0: - version "0.2.0" - resolved "http://registry.npm.taobao.org/querystring/download/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - raf@^3.1.0: version "3.4.1" resolved "http://registry.npm.taobao.org/raf/download/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39"