Fix NAS badge color and icon in AppMenuView

- NAS reachable → green "Connected" (TCP ping = usable, not a warning state)
- NAS offline → orange "Offline" (matches color rule: orange = not reachable)
- NAS icon changed from externaldrive to server.rack

Co-Authored-By: Kutesir <kutesir@provoc.ug>
Co-Authored-By: Sentry <sentry@provoc.ug>
This commit is contained in:
Robin Kutesa
2026-05-17 12:01:42 +03:00
parent a077964d75
commit a68cf0e5ec

View File

@@ -31,10 +31,10 @@ struct AppMenuView: View {
return AppTheme.inkQuaternary
}
// NAS badge TCP ping only, never green (not auth-confirmed)
// NAS badge green when reachable, orange when offline, muted when unknown
private var nasBadgeLabel: String {
switch lanMonitor.nasReachable {
case true: return "Reachable"
case true: return "Connected"
case false: return "Offline"
default: return "Unknown"
}
@@ -42,8 +42,8 @@ struct AppMenuView: View {
private var nasBadgeColor: Color {
switch lanMonitor.nasReachable {
case true: return Color(red: 1.0, green: 0.58, blue: 0.0)
case false: return AppTheme.destructive
case true: return AppTheme.positive
case false: return Color(red: 1.0, green: 0.58, blue: 0.0)
default: return AppTheme.inkQuaternary
}
}
@@ -102,7 +102,7 @@ struct AppMenuView: View {
VStack(spacing: 0) {
// NAS row
HStack(spacing: 12) {
iconBadge("externaldrive", color: AppTheme.inkSecondary)
iconBadge("server.rack", color: AppTheme.inkSecondary)
VStack(alignment: .leading, spacing: 2) {
Text(store.savedConnection?.displayName ?? "No NAS connected")