diff --git a/README.md b/README.md index b5a889b..08459e3 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ Play does not filter the app off devices without it. ```bash flutter pub get flutter run # any connected device or simulator -flutter test # 79 tests covering the whole flow +flutter test # 88 tests covering the whole flow ``` `flutter run` talks to `https://api.doormile.com/api/v1`. Point it somewhere @@ -180,6 +180,25 @@ else with a define: flutter run --dart-define=DM_API_BASE=https:///api/v1 ``` +### Which build am I in? + +Every debug launch prints it as its first line: + +``` +[BUILD] DEV DATA (offline) · staging · no network ← the fake, any code works +[BUILD] staging · https://api.doormile.com/api/v1 ← the real server +``` + +Check that line before anything else. The two builds are identical on screen, +and the whole reason the first offline mode was deleted was that nobody could +tell which one a handset was running. The Account screen says the same thing +under **BUILD**, but a build that cannot get past the login screen cannot show +you the Account screen — which is exactly when you need to know. + +**`[API] 401 …/auth/otp/verify · invalid_otp` means you are on the real server** +and it refused the code. `1234` is not a real code; only the offline build +accepts anything. See below. + ### Signing in for development A shipping build has **one** API implementation, `LiveDoormileApi`, and it talks @@ -194,10 +213,13 @@ in: ```bash flutter run --dart-define=DM_MOCK=true -# login screen → 9876543210 → 1234 → in. -# add --dart-define=DM_DEV_LOGIN=true to skip the login screen entirely. ``` +It opens **straight on Home**, already signed in as Joe Oommen — there is no +server to refuse anybody, so stopping at a login screen would ask for a phone +number and a code that mean nothing. Sign out and you get the real entrance, +where any 10-digit number and **any 4-digit code** get you back in. + This swaps in `DevDoormileApi`: in-memory serviceability, slots, fare and bookings, so you can walk signup → book → track without a backend. **A booking made here stays on the device — it reaches no server and no admin console.** The @@ -212,6 +234,21 @@ flutter run --dart-define=DM_DEV_TOKEN=eyJ... \ --dart-define=DM_DEV_REFRESH_TOKEN=... ``` +**Real sign-in, no login screen** — runs the actual OTP request and verify pair +at launch, so what it ends up holding is a token the server issued and a +booking it makes reaches `pickupbookings` and the admin console: + +```bash +flutter run --dart-define=DM_LOGIN_AS=9876543210 \ + --dart-define=DM_LOGIN_CODE= +``` + +The code has to be one the server will take. Two ways to have one: set +`CX_STAGING_OTP` on a non-production backend (a fixed code, refused outright +when `ENV=production`), or read the code the backend logged — with no SMS +gateway registered its `logSender` writes every code to the application log and +reports the send as successful. + ### Walking a booking through its stages Against dev data, the tracking screen's stepper walks the in-memory booking. diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml index d863c0b..7ef0971 100644 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -1,11 +1,11 @@ - + - diff --git a/android/app/src/main/res/drawable/dm_mark_brand.xml b/android/app/src/main/res/drawable/dm_mark_brand.xml deleted file mode 100644 index b73f320..0000000 --- a/android/app/src/main/res/drawable/dm_mark_brand.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/android/app/src/main/res/drawable/dm_mark_fg.png b/android/app/src/main/res/drawable/dm_mark_fg.png new file mode 100644 index 0000000..25c6977 Binary files /dev/null and b/android/app/src/main/res/drawable/dm_mark_fg.png differ diff --git a/android/app/src/main/res/drawable/dm_mark_white.xml b/android/app/src/main/res/drawable/dm_mark_white.xml deleted file mode 100644 index c3aecbb..0000000 --- a/android/app/src/main/res/drawable/dm_mark_white.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/android/app/src/main/res/drawable/dm_splash_blank.png b/android/app/src/main/res/drawable/dm_splash_blank.png new file mode 100644 index 0000000..08b0366 Binary files /dev/null and b/android/app/src/main/res/drawable/dm_splash_blank.png differ diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml index d863c0b..7ef0971 100644 --- a/android/app/src/main/res/drawable/launch_background.xml +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -1,11 +1,11 @@ - + - diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index c608ac2..8fdb67d 100644 --- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,6 +1,15 @@ + - - - + + + diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index c608ac2..8fdb67d 100644 --- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,6 +1,15 @@ + - - - + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index e111dc5..76b6de7 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index bdb7152..4dc9d2a 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index c290cf8..2ed0860 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 92556da..a7c752b 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 5fe6a29..b9cdb01 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night-v31/styles.xml b/android/app/src/main/res/values-night-v31/styles.xml index 2ee3677..6761aa8 100644 --- a/android/app/src/main/res/values-night-v31/styles.xml +++ b/android/app/src/main/res/values-night-v31/styles.xml @@ -1,11 +1,16 @@ - +