diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/AppCoordinator.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/AppCoordinator.swift index 1462c2acb..d0bfdee41 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/App/AppCoordinator.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/App/AppCoordinator.swift @@ -168,15 +168,15 @@ extension AppCoordinator { } enterDetail(of: profile) }, - onEditProviderEntity: { + onMigrateProfiles: { + modalRoute = .migrateProfiles + }, + onProviderEntityRequired: { guard let pair = $0.selectedProvider else { return } present(.editProviderEntity($0, pair.module, pair.selection)) }, - onMigrateProfiles: { - modalRoute = .migrateProfiles - }, onPurchaseRequired: { features in setLater(.purchase(features)) { paywallReason = $0 diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/InstalledProfileView.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/InstalledProfileView.swift index 818c1f1c2..33b4e93e7 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/App/InstalledProfileView.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/App/InstalledProfileView.swift @@ -137,7 +137,7 @@ private extension InstalledProfileView { .selectedProvider .map { _, selection in Button { - flow?.onEditProviderEntity(profile!) + flow?.onProviderEntityRequired(profile!) } label: { providerSelectorLabel(with: selection) } @@ -202,7 +202,7 @@ private struct ToggleButton: View { interactiveManager: interactiveManager, errorHandler: errorHandler, onProviderEntityRequired: { - flow?.onEditProviderEntity($0) + flow?.onProviderEntityRequired($0) }, onPurchaseRequired: { flow?.onPurchaseRequired($0) diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContainerView.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContainerView.swift index d3eeb6ff5..085ce9cef 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContainerView.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContainerView.swift @@ -96,7 +96,7 @@ private extension ProfileContainerView { InteractiveCoordinator(style: .modal, manager: interactiveManager) { errorHandler.handle( $0, - title: Strings.Global.Nouns.connection, + title: interactiveManager.editor.profile.name, message: Strings.Views.App.Errors.tunnel ) } diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContextMenu.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContextMenu.swift index 5b1798576..2ed113e3b 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContextMenu.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContextMenu.swift @@ -71,7 +71,7 @@ private extension ProfileContextMenu { interactiveManager: interactiveManager, errorHandler: errorHandler, onProviderEntityRequired: { - flow?.onEditProviderEntity($0) + flow?.onProviderEntityRequired($0) }, onPurchaseRequired: { flow?.onPurchaseRequired($0) @@ -90,7 +90,7 @@ private extension ProfileContextMenu { .selectedProvider .map { _ in Button(Strings.Views.App.ProfileContext.connectTo) { - flow?.onEditProviderEntity(profile!) + flow?.onProviderEntityRequired(profile!) } } } diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileFlow.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileFlow.swift index 781372ec3..e20943d9c 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileFlow.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileFlow.swift @@ -30,9 +30,9 @@ import PassepartoutKit struct ProfileFlow { let onEditProfile: (ProfilePreview) -> Void - let onEditProviderEntity: (Profile) -> Void - let onMigrateProfiles: () -> Void + let onProviderEntityRequired: (Profile) -> Void + let onPurchaseRequired: (Set) -> Void } diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileRowView.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileRowView.swift index 0046ccb62..7808349c3 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileRowView.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileRowView.swift @@ -135,7 +135,7 @@ private extension ProfileRowView { interactiveManager: interactiveManager, errorHandler: errorHandler, onProviderEntityRequired: { - flow?.onEditProviderEntity($0) + flow?.onProviderEntityRequired($0) }, onPurchaseRequired: { flow?.onPurchaseRequired($0) diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/TunnelRestartButton.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/TunnelRestartButton.swift index ab72930d4..9dbcda2c5 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/App/TunnelRestartButton.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/App/TunnelRestartButton.swift @@ -59,7 +59,7 @@ struct TunnelRestartButton