diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/AddProfileMenu.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/AddProfileMenu.swift
index b4ecec73..75fe4064 100644
--- a/Passepartout/Library/Sources/AppUIMain/Views/App/AddProfileMenu.swift
+++ b/Passepartout/Library/Sources/AppUIMain/Views/App/AddProfileMenu.swift
@@ -43,6 +43,7 @@ struct AddProfileMenu: View {
Menu {
emptyProfileButton
importProfileButton
+ Divider()
providerProfileMenu
Divider()
migrateProfilesButton
@@ -58,7 +59,7 @@ private extension AddProfileMenu {
let editable = EditableProfile(name: newName)
onNewProfile(editable, nil)
} label: {
- ThemeImageLabel(Strings.Views.App.Toolbar.NewProfile.empty.withTrailingDots, .profileEdit)
+ ThemeImageLabel(Strings.Views.App.Toolbar.NewProfile.empty, .profileEdit)
}
}
diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContextMenu.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContextMenu.swift
index 17f68d6b..43fb0eaf 100644
--- a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContextMenu.swift
+++ b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileContextMenu.swift
@@ -53,13 +53,13 @@ struct ProfileContextMenu: View, Routable {
var body: some View {
tunnelToggleButton
- providerConnectToButton
if style == .installedProfile {
tunnelRestartButton
}
+ providerConnectToButton
+ Divider()
profileEditButton
- if [.installedProfile, .containerContext].contains(style) {
- Divider()
+ if style == .containerContext {
profileDuplicateButton
profileRemoveButton
}
@@ -95,15 +95,17 @@ private extension ProfileContextMenu {
}
var providerConnectToButton: some View {
- profile?
- .selectedProvider
- .map { _ in
- Button {
- flow?.onProviderEntityRequired(profile!)
- } label: {
+ profile.map {
+ ProviderConnectToButton(
+ profile: $0,
+ onTap: {
+ flow?.onProviderEntityRequired($0)
+ },
+ label: {
ThemeImageLabel(Strings.Views.App.ProfileContext.connectTo.withTrailingDots, .profileProvider)
}
- }
+ )
+ }
}
var tunnelRestartButton: some View {
@@ -124,7 +126,7 @@ private extension ProfileContextMenu {
Button {
flow?.onEditProfile(preview)
} label: {
- ThemeImageLabel(Strings.Global.Actions.edit.withTrailingDots, .profileEdit)
+ ThemeImageLabel(Strings.Global.Actions.edit, .profileEdit)
}
}
diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileRowView.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileRowView.swift
index b5e000f3..47ac395a 100644
--- a/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileRowView.swift
+++ b/Passepartout/Library/Sources/AppUIMain/Views/App/ProfileRowView.swift
@@ -178,7 +178,7 @@ private extension ProfileRowView {
var infoButton: some View {
Menu {
ProfileContextMenu(
- style: .infoButton,
+ style: preview.id == tunnel.currentProfile?.id ? .installedProfile : .infoButton,
profileManager: profileManager,
tunnel: tunnel,
preview: preview,
diff --git a/Passepartout/Library/Sources/AppUIMain/Views/AppMenu/macOS/AppMenu.swift b/Passepartout/Library/Sources/AppUIMain/Views/AppMenu/macOS/AppMenu.swift
index 11d6a2e7..1e730b94 100644
--- a/Passepartout/Library/Sources/AppUIMain/Views/AppMenu/macOS/AppMenu.swift
+++ b/Passepartout/Library/Sources/AppUIMain/Views/AppMenu/macOS/AppMenu.swift
@@ -112,7 +112,7 @@ private extension AppMenu {
}
var aboutButton: some View {
- Button(Strings.Global.Nouns.about.withTrailingDots) {
+ Button(Strings.Global.Nouns.about) {
NSApp.activate(ignoringOtherApps: true)
NSApp.orderFrontStandardAboutPanel(self)
}
diff --git a/Passepartout/Library/Sources/AppUIMain/Views/Providers/ProviderConnectToButton.swift b/Passepartout/Library/Sources/AppUIMain/Views/Providers/ProviderConnectToButton.swift
new file mode 100644
index 00000000..b50c86b7
--- /dev/null
+++ b/Passepartout/Library/Sources/AppUIMain/Views/Providers/ProviderConnectToButton.swift
@@ -0,0 +1,64 @@
+//
+// ProviderConnectToButton.swift
+// Passepartout
+//
+// Created by Davide De Rosa on 11/27/24.
+// Copyright (c) 2024 Davide De Rosa. All rights reserved.
+//
+// https://github.com/passepartoutvpn
+//
+// This file is part of Passepartout.
+//
+// Passepartout is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Passepartout is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Passepartout. If not, see .
+//
+
+import CommonLibrary
+import PassepartoutKit
+import SwiftUI
+
+struct ProviderConnectToButton