|
|
@ -84,7 +84,9 @@ void Sidebar::updateState(const UIState &s) { |
|
|
|
if (last_ping == 0) { |
|
|
|
if (last_ping == 0) { |
|
|
|
connectStatus = ItemStatus{{tr("CONNECT"), tr("OFFLINE")}, warning_color}; |
|
|
|
connectStatus = ItemStatus{{tr("CONNECT"), tr("OFFLINE")}, warning_color}; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
connectStatus = nanos_since_boot() - last_ping < 80e9 ? ItemStatus{{tr("CONNECT"), tr("ONLINE")}, good_color} : ItemStatus{{tr("CONNECT"), tr("ERROR")}, danger_color}; |
|
|
|
connectStatus = nanos_since_boot() - last_ping < 80e9 |
|
|
|
|
|
|
|
? ItemStatus{{tr("CONNECT"), tr("ONLINE")}, good_color} |
|
|
|
|
|
|
|
: ItemStatus{{tr("CONNECT"), tr("ERROR")}, danger_color}; |
|
|
|
} |
|
|
|
} |
|
|
|
setProperty("connectStatus", QVariant::fromValue(connectStatus)); |
|
|
|
setProperty("connectStatus", QVariant::fromValue(connectStatus)); |
|
|
|
|
|
|
|
|
|
|
|