Files
archived-matedroid/app
Davide Ferrari a6bd609269 feat(settings): add secondary server URL with fallback and reorganize settings UI (#56)
* feat(settings): add secondary server URL with fallback and reorganize settings UI

- Add optional secondary server URL for fallback when primary is unreachable
- Implement automatic fallback logic for network-level errors (timeout, connection refused, DNS failure)
- Reorganize Settings screen with collapsible sections:
  - "Advanced network settings" (collapsed): secondary URL, API token, certificate toggle
  - "Display Settings": currency, Teslamate base URL
  - "Extra settings" (collapsed): show short drives toggle, force resync button
- Update TeslamateApiFactory to cache multiple API instances for both servers
- Update all tests for new settings structure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(settings): test both primary and secondary servers in connection test

- Update TestResult to show individual results for each server
- Test Connection button now tests both servers when secondary is configured
- UI shows both server results with clear labels and status
- Add new tests for dual-server connection testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 21:38:41 +01:00
..