diff --git a/NetBird/Source/App/Views/Components/RouteCard.swift b/NetBird/Source/App/Views/Components/RouteCard.swift index 0490e72..efe79fc 100644 --- a/NetBird/Source/App/Views/Components/RouteCard.swift +++ b/NetBird/Source/App/Views/Components/RouteCard.swift @@ -19,10 +19,6 @@ struct RouteCard: View { var body: some View { HStack { HStack { - RoundedRectangle(cornerRadius: 8) - .fill(statusIndicatorColor) - .frame(width: 8, height: 40) - VStack(alignment: .leading) { Text(route.name) .foregroundColor(Color("TextPeerCard")) @@ -96,14 +92,6 @@ struct RouteCard: View { ) } - private var statusIndicatorColor: Color { - guard route.selected else { return Color.gray.opacity(0.5) } - - // Status is computed by the core, which correctly handles merged exit nodes - // (v4/v6 pair) and dynamic routes; the UI just reflects it. - return route.status == "Connected" ? Color.green : Color.yellow - } - private var routeDisplayText: String { if let domains = route.domains, !domains.isEmpty { if domains.count > 2 { diff --git a/NetbirdKit/RoutesSelectionDetails.swift b/NetbirdKit/RoutesSelectionDetails.swift index 69576e9..ec9492f 100644 --- a/NetbirdKit/RoutesSelectionDetails.swift +++ b/NetbirdKit/RoutesSelectionDetails.swift @@ -52,10 +52,8 @@ class RoutesSelectionInfo: ObservableObject, Codable, Identifiable { var network: String? var domains: [DomainDetails]? var selected: Bool - // Connection status computed by the core ("Connected"/"Idle"). UI consumers read - // it directly (e.g. RouteCard.statusIndicatorColor uses route.status); there is no - // network-string fallback. A nil/empty value from an older core is treated as - // not-connected, so a selected route shows the yellow ("unknown") indicator. + // Connection status computed by the core ("Connected"/"Idle"). A nil/empty value + // from an older core is treated as not-connected. var status: String? init(id: UUID = UUID(), name: String, network: String?, domains: [DomainDetails]?, selected: Bool, status: String? = nil) {