summaryrefslogtreecommitdiff
path: root/lib/ui.dart
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2026-01-17 21:12:25 +0100
committerxengineering <me@xengineering.eu>2026-01-17 21:12:25 +0100
commitb38f887c0ed04e32ae62f097288fd318b4d3c8f2 (patch)
tree814e5c8c4056160d247bd30414b711d521fb233f /lib/ui.dart
parentf083de5a7d4bbc296e5fa07707a4a179f780f85b (diff)
downloadsia-app-main.tar
sia-app-main.tar.zst
sia-app-main.zip
Indicate disconnected Sia serverHEADmain
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.dart6
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');