diff --git a/NucleicRemote/NucleicRemote/Views/SettingsView.swift b/NucleicRemote/NucleicRemote/Views/SettingsView.swift index 26fd75c..a9c2547 100644 --- a/NucleicRemote/NucleicRemote/Views/SettingsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SettingsView.swift @@ -59,7 +59,7 @@ struct SettingsView: View { } Section("Connection") { - LabeledContent("Status", value: store.connectivity.label) + LabeledContent("Status", value: Self.statusLabel(store.connectivity)) // What this pairing can dial โ€” the live transport is in Status above. if let host = IdentityStore.loadPairedHost() { LabeledContent("Transports", value: Self.transportsLabel(host)) @@ -209,6 +209,15 @@ struct SettingsView: View { } } + /// The live-connection status shown in the Connection section. Matches the generic + /// `Connectivity.label` except that a direct (hole-punched) path is named "Direct (STUN)" + /// here to surface *how* the peer-to-peer link was established โ€” `.direct` is produced only + /// by the STUN-based upgrade. The chip and other surfaces keep the shorter "Direct". + private static func statusLabel(_ connectivity: RemoteStore.Connectivity) -> String { + if case .connected(.direct) = connectivity { return "Connected ยท Direct (STUN)" } + return connectivity.label + } + /// Every path this pairing can dial: LAN always, plus what the host advertised โ€” a /// tailnet hint from the QR and/or a relay membership (QR or the host's later push). private static func transportsLabel(_ host: PairedHost) -> String {