Always show "Reconnect" button (#278)
Will do nothing if VPN is disabled. Suboptimal, but consistent with Mac menu.
This commit is contained in:
parent
6fd1f96e54
commit
7f9ae7c3bc
|
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Changed
|
||||
|
||||
- Bump targets to iOS 15 / macOS 12.
|
||||
- Always show "Reconnect" button. [#277](https://github.com/passepartoutvpn/passepartout-apple/pull/277)
|
||||
- Move Diagnostics view to Profile bottom. [#261](https://github.com/passepartoutvpn/passepartout-apple/pull/261)
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -148,19 +148,11 @@ extension OrganizerView {
|
|||
}
|
||||
|
||||
var body: some View {
|
||||
|
||||
// XXX: iOS bug, before 16, context menu is not redrawn on VPN state change
|
||||
if #available(iOS 16, *), isActiveProfileNotDisconnected {
|
||||
reconnectButton
|
||||
}
|
||||
reconnectButton
|
||||
duplicateButton
|
||||
deleteButton
|
||||
}
|
||||
|
||||
private var isActiveProfileNotDisconnected: Bool {
|
||||
profileManager.isActiveProfile(header.id) && currentVPNState.vpnStatus != .disconnected
|
||||
}
|
||||
|
||||
private var reconnectButton: some View {
|
||||
ProfileView.ReconnectButton()
|
||||
}
|
||||
|
|
|
@ -93,9 +93,7 @@ extension ProfileView {
|
|||
|
||||
private var mainView: some View {
|
||||
Menu {
|
||||
if isActiveProfileNotDisconnected {
|
||||
ReconnectButton()
|
||||
}
|
||||
ReconnectButton()
|
||||
ShortcutsButton(
|
||||
modalType: $modalType
|
||||
)
|
||||
|
@ -115,10 +113,6 @@ extension ProfileView {
|
|||
}
|
||||
}
|
||||
|
||||
private var isActiveProfileNotDisconnected: Bool {
|
||||
profileManager.isActiveProfile(header.id) && currentVPNState.vpnStatus != .disconnected
|
||||
}
|
||||
|
||||
private var uninstallVPNButton: some View {
|
||||
Button {
|
||||
actionSheetType = .uninstallVPN
|
||||
|
|
Loading…
Reference in New Issue