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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user