mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-12 17:26:22 +00:00
refactor: display id-cards in their own modal
This commit is contained in:
committed by
Thea Schöbl
parent
a6b88d3534
commit
341b209092
@@ -13,25 +13,25 @@ The StApps 1.x.x (legacy app, but current app in stores) is written using Ionic
|
||||
|
||||
There are (`npm`) scripts defined to get the app running as quickly as possible. Those scripts (shortcuts for docker commands) are called using the syntax `npm run + <script-name>`. So we have the following commands available:
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run docker:pull
|
||||
```
|
||||
|
||||
which pulls the up-to-date image ([Dockerfile](Dockerfile)) which contains all the tools needed for building, serving and deploying the app.
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run docker:enter
|
||||
```
|
||||
|
||||
which enters the container on docker builder image, where we can run `npm install` (to install the required npm packages) and `npm build` (to build the app: convert into executable files), but also any other arbitrary commands with the tools available in the docker image.
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run docker:build
|
||||
```
|
||||
|
||||
which runs `npm install` (to install the required npm packages) and `npm build` (to build the app: convert into executable files) in the docker container which runs on the docker builder image.
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run docker:serve
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ which serves the app for running it in the browser. It basically runs `ionic ser
|
||||
|
||||
## How to build and start the app using the default backend?
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run build
|
||||
npm run start
|
||||
```
|
||||
@@ -86,52 +86,85 @@ addToIonicDB(
|
||||
|
||||
You'll need to run _Chromium_ using
|
||||
|
||||
```shell
|
||||
```sh
|
||||
pnpm chromium:no-cors
|
||||
```
|
||||
|
||||
### Help, I can't log in!
|
||||
|
||||
Login services will often block hosts not coming from the production
|
||||
server. You can circumvent this locally by using the `:virtual-host`
|
||||
scripts:
|
||||
server.
|
||||
|
||||
```shell
|
||||
#### Web
|
||||
|
||||
On the web you can circumvent this locally by using the `:virtual-host` scripts:
|
||||
|
||||
```sh
|
||||
# Start the dev server on mobile.app.uni-frankfurt.de
|
||||
pnpm start:virtual-host
|
||||
# Run chromium with flags that redirect mobile.app.uni-frankfurt.de to localhost:8100
|
||||
pnpm chromium:virtual-host
|
||||
```
|
||||
|
||||
#### Android
|
||||
|
||||
On Android you will need to change the `custom_url_scheme` values
|
||||
to `de.unifrankfurt.app` in the following files:
|
||||
|
||||
- `android/app/src/main/res/values/strings.xml`
|
||||
- `src/environment/environment.ts`
|
||||
|
||||
Then start the app normally as you would
|
||||
|
||||
```sh
|
||||
pnpm run:android
|
||||
```
|
||||
|
||||
#### iOS
|
||||
|
||||
On Android you will need to change the `custom_url_scheme` value in
|
||||
`src/environment/environment.ts` as well as the `CFBundleURLTypes`
|
||||
in `ios/App/App/Info.plist`.
|
||||
|
||||
- make sure to remove any `Info.plist.orig` as capacitor might override
|
||||
the modified `Info.plist` with that.
|
||||
- make sure you have a valid device in XCode (Simulator or real device).
|
||||
|
||||
After that, run
|
||||
|
||||
```sh
|
||||
pnpm run:ios
|
||||
```
|
||||
|
||||
### Running the app
|
||||
|
||||
Install the npm packages needed for running the app (as for any other node project which uses npm):
|
||||
|
||||
```
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
Check the code for linter issues:
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run lint
|
||||
```
|
||||
|
||||
Automatically fix linter issues (those where autofix is possible):
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run lint:fix
|
||||
```
|
||||
|
||||
Build the app (transpile etc.):
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
Open the app in the browser:
|
||||
|
||||
```
|
||||
```sh
|
||||
ionic serve
|
||||
```
|
||||
|
||||
@@ -139,7 +172,7 @@ ionic serve
|
||||
|
||||
Run the app for testing on an android device (with live reload in the webview / device, when files are changed):
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run build # if needed
|
||||
npm run resources:android # generate needed resources (icons and splashscreens)
|
||||
npm run docker:run:android # runs "ionic capacitor run android --livereload --external" on a selected device
|
||||
@@ -159,7 +192,7 @@ Besides that, it is possible to monitor processes (and so the processes related
|
||||
|
||||
Build the (debug) app for testing on an android device (creates an APK file in the android's build outputs path):
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run docker:build:android
|
||||
```
|
||||
|
||||
@@ -169,13 +202,13 @@ The mentioned `docker:*:android` npm commands are executed in a docker container
|
||||
|
||||
Execute unit tests:
|
||||
|
||||
```
|
||||
```sh
|
||||
npm test
|
||||
```
|
||||
|
||||
Execute e2e tests:
|
||||
|
||||
```
|
||||
```sh
|
||||
npm run e2e
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user