diff options
| author | xengineering <me@xengineering.eu> | 2026-01-17 21:12:25 +0100 |
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2026-01-17 21:12:25 +0100 |
| commit | b38f887c0ed04e32ae62f097288fd318b4d3c8f2 (patch) | |
| tree | 814e5c8c4056160d247bd30414b711d521fb233f /lib/ui.dart | |
| parent | f083de5a7d4bbc296e5fa07707a4a179f780f85b (diff) | |
| download | sia-app-b38f887c0ed04e32ae62f097288fd318b4d3c8f2.tar sia-app-b38f887c0ed04e32ae62f097288fd318b4d3c8f2.tar.zst sia-app-b38f887c0ed04e32ae62f097288fd318b4d3c8f2.zip | |
There are now three instead of two status states:
- "Connected" / MQTT connected, Sia server connected
- "Connection issue" / MQTT connected, Sia server disconnected
- "Disconnected" / all other cases (Sia server connection unknown)
Diffstat (limited to 'lib/ui.dart')
| -rw-r--r-- | lib/ui.dart | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ui.dart b/lib/ui.dart index 38ace9a..e6cb6f4 100644 --- a/lib/ui.dart +++ b/lib/ui.dart @@ -58,9 +58,13 @@ class ConnectionStatus extends StatelessWidget { builder: (BuildContext context, AppState state, Widget? child) { Icon icon; Text text; - if (state.brokerConnected) { + + if (state.brokerConnected && state.serverConnected) { icon = const Icon(Icons.cloud, color: Colors.green); text = const Text('Connected'); + } else if (state.brokerConnected && !state.serverConnected) { + icon = const Icon(Icons.cloud_off, color: Colors.orange); + text = const Text('Connection issue'); } else { icon = const Icon(Icons.cloud_off, color: Colors.red); text = const Text('Disconnected'); |
