Commit Graph

13 Commits

Author SHA1 Message Date
jesxion
cb6010715d fix: correct hazard upload flow
- Fix upload-token API: backend returns { uploadUrl, objectKey } directly
  (camelCase, no ApiResponse wrapper); update UploadTokenResult interface
  and remove incorrect res.data access
- Fix confirm API: backend returns { fileId, objectKey } directly (no url,
  no ApiResponse wrapper); update ConfirmResult interface accordingly
- uploadPhoto now returns { url: blobUrl, extra: { objectKey } } so the
  ImageUploader can show a local preview while HazardReportPage submits
  the confirmed objectKey (via extra) rather than the ephemeral blob URL
- Fix geolocation: getCurrentPosition returns void, not a watch ID;
  remove the incorrect cast and clearWatch cleanup call; drop unused gpsWatchId ref

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 18:30:39 +08:00
jesxion
4bd95c4ce7 test: cover hazard severity labels
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 18:13:56 +08:00
jesxion
b379ccd415 feat: port hazards flow to ant mobile
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 18:08:57 +08:00
jesxion
1b6601068e fix: validate login session payload
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 17:59:16 +08:00
jesxion
e79eee6e15 fix: align home activity semantics
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 17:48:23 +08:00
jesxion
d7da6d1331 test: align ui model test location
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 17:33:22 +08:00
jesxion
7e7790c4af refactor: align ant mobile shell structure
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 17:27:44 +08:00
jesxion
24f0d30e46 fix: align home subtitle copy
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 17:18:09 +08:00
jesxion
d1118f7eee fix: restore shell page semantics
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 17:11:12 +08:00
jesxion
8cb468c4cf feat: port auth shell to ant mobile
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 17:02:08 +08:00
jesxion
71c437968a fix: type vite env settings
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 16:44:57 +08:00
jesxion
a994c8d076 fix: harden ant mobile scaffold config
- vite.config.ts: use loadEnv() to read VITE_BASE (base path) and
  DEV_API_TARGET (proxy target) from .env; falls back to '/' and
  http://127.0.0.1:3201 so local dev is unchanged
- App.tsx: pass basename={import.meta.env.BASE_URL} to BrowserRouter
  so router paths align with the Vite base at runtime
- global.css: change #root overflow from hidden to auto so page
  content is scrollable
- .env: document VITE_BASE, VITE_API_BASE, DEV_API_TARGET defaults
- src/config.ts: expose apiBase helper for runtime API prefix
- tsconfig.json: add vite/client types so import.meta.env is typed

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 16:42:24 +08:00
jesxion
c5508a1927 feat: scaffold ant design mobile frontend
- Vite + React 18 + TypeScript + React Router v6 + Ant Design Mobile
- /v1 proxy to http://127.0.0.1:3201 in vite.config.ts
- Placeholder routes for / and /login
- Build verified passing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 16:38:00 +08:00