From 8536aee755388aab03fca2ef30b22b9890d620b1 Mon Sep 17 00:00:00 2001 From: Davide Date: Tue, 29 Oct 2024 11:50:33 +0100 Subject: [PATCH] Show hostname with middle truncation on iOS --- .../Library/Sources/AppUI/Views/Provider/ProviderPicker.swift | 2 +- .../AppUI/Views/Provider/iOS/VPNProviderServerView+iOS.swift | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Passepartout/Library/Sources/AppUI/Views/Provider/ProviderPicker.swift b/Passepartout/Library/Sources/AppUI/Views/Provider/ProviderPicker.swift index 2949e9e4..5e65601d 100644 --- a/Passepartout/Library/Sources/AppUI/Views/Provider/ProviderPicker.swift +++ b/Passepartout/Library/Sources/AppUI/Views/Provider/ProviderPicker.swift @@ -26,7 +26,7 @@ import PassepartoutKit import SwiftUI -// FIXME: #746, providers UI, iPadOS (Simulator?) picker .navigationLink selection is blue (vs gray) and disclosed options are white +// FIXME: #774, iPadOS (Simulator?) picker .navigationLink selection is blue (vs gray) and disclosed options are white struct ProviderPicker: View { let providers: [ProviderMetadata] diff --git a/Passepartout/Library/Sources/AppUI/Views/Provider/iOS/VPNProviderServerView+iOS.swift b/Passepartout/Library/Sources/AppUI/Views/Provider/iOS/VPNProviderServerView+iOS.swift index 30a01d38..fc6d6545 100644 --- a/Passepartout/Library/Sources/AppUI/Views/Provider/iOS/VPNProviderServerView+iOS.swift +++ b/Passepartout/Library/Sources/AppUI/Views/Provider/iOS/VPNProviderServerView+iOS.swift @@ -184,8 +184,9 @@ private extension VPNProviderServerView.ServersSubview { Text(area) .font(.headline) } - Text(server.provider.serverId) + Text(server.hostname ?? server.serverId) .font(.subheadline) + .truncationMode(.middle) } Spacer() FavoriteToggle(