Commit graph

16 commits

Author SHA1 Message Date
James Rich
43561cabe9
refactor: Improve device details layout (#1489)
- Device details section visible only if device hardware is available.
- Added spacing between icon, label, and value in node details rows.
- Right-aligned the values in node details rows for better readability.
2024-12-22 06:56:40 -03:00
andrekir
d6a7a60a3c fix: node detail mismatch key layout 2024-12-10 12:58:05 -03:00
andrekir
1a67ea8ad4 refactor: add DTO mapper for DeviceHardware 2024-12-10 12:55:48 -03:00
James Rich
993f659742
feat: add support for Device Hardware json and svg graphics (#1449)
* feat: add support for Device Hardware json and svg graphics

Allows for better hardware device display names, graphics, and indication of support.

* make detekt happy

* Fix: Use first image name to find vector drawable

Use the first image name from the `images` list (after removing the ".svg" suffix) to find the corresponding vector drawable resource.

* Refactor: Update device detail layout

Updated the device detail layout to group device-specific information under a "Device" category.
Added a circular background with device-specific color behind the device icon.
Moved hardware, support status details to the Device section.

* Refactor: Move device hardware logic to MetricsViewModel

Moves the logic for retrieving device hardware information and image resources from NodeDetail to MetricsViewModel.

Also replaces id lookup with when statement for image resource id mapping.

* fix: cache deviceHardwareList, add exception handling

* refactor: mutable list unnecessary

* default to hw_unknown device image
2024-12-10 12:02:57 -03:00
andrekir
94dc3dead1 feat: add EnvironmentMetrics radiation to node detail 2024-12-05 19:39:37 -03:00
andrekir
716a3f535f refactor: decouple NavGraph from ViewModel and NodeEntity 2024-11-30 08:05:48 -03:00
andrekir
6230f13bff refactor: add custom formatting to LocalStats fields 2024-11-26 09:00:44 -03:00
andrekir
1219d3037e chore: add GPL-3.0 license headers to source files 2024-11-26 08:54:18 -03:00
andrekir
c4b07af408 feat: add EnvironmentMetrics distance, lux, wind and weight to node detail
closes #1399
2024-11-23 07:16:35 -03:00
andrekir
1ae65ef267 refactor: pass nav args to ViewModel using SavedStateHandle 2024-11-10 07:45:25 -03:00
andrekir
296f1944b7 refactor: migrate Compose navigation to type-safe args 2024-11-10 07:45:25 -03:00
Andre K
227c65f191
feat: node map position history log (#1384) 2024-11-06 11:00:38 -03:00
andrekir
3bfbe12fd9 fix: PowerMetrics voltage to display 2 decimals 2024-11-04 12:25:57 -03:00
andrekir
adbe5952fc feat: position logs 2024-11-02 17:22:54 -03:00
andrekir
26f210047d refactor: split MetricsViewModel state updates
- Consolidates `MetricViewModel` back to a single state flow
- Introduces a `MutableStateFlow` for state updates, allowing more independent control
- Moves `Telemetry`, `MeshPacket`, and config updates into separate coroutines
2024-11-02 09:46:15 -03:00
andrekir
b668a21b68 refactor: move node detail logs to shared ViewModel 2024-10-30 18:53:44 -03:00
Renamed from app/src/main/java/com/geeksville/mesh/ui/NodeDetailsScreen.kt (Browse further)