Move Diagnostics view to Profile bottom (#261)
This commit is contained in:
parent
e7a98acf9c
commit
cecf64d871
|
@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Ukranian translations (Dmitry Chirkin). [#243](https://github.com/passepartoutvpn/passepartout-apple/pull/243)
|
||||
- OpenVPN: Full implementation of Tunnelblick XOR patch (tmthecoder). [#245](https://github.com/passepartoutvpn/passepartout-apple/pull/245), [tunnelkit#255][https://github.com/passepartoutvpn/tunnelkit/pull/255]
|
||||
|
||||
### Changed
|
||||
|
||||
- Move Diagnostics view to Profile bottom. [#261](https://github.com/passepartoutvpn/passepartout-apple/pull/261)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Improve kill switch behavior. [#181](https://github.com/passepartoutvpn/passepartout-apple/issues/181)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
0E0BD27927B2EBE500583AC5 /* ShortcutsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0BD27827B2EBE500583AC5 /* ShortcutsView.swift */; };
|
||||
0E0C0729236087A100155AAC /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0E0C072B236087A100155AAC /* InfoPlist.strings */; };
|
||||
0E12BC8F27F62C8600B2F912 /* Validators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E12BC8E27F62C8500B2F912 /* Validators.swift */; };
|
||||
0E1B5F5C29C506AD00FE7D18 /* ProfileView+Diagnostics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E1B5F5B29C506AC00FE7D18 /* ProfileView+Diagnostics.swift */; };
|
||||
0E1F5628287F0ECB00F8ADD7 /* ProviderProfileItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E1F5627287F0ECB00F8ADD7 /* ProviderProfileItem.swift */; };
|
||||
0E1F562B287F0EF100F8ADD7 /* ProviderProfileItem+ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E1F5629287F0EEE00F8ADD7 /* ProviderProfileItem+ViewModel.swift */; };
|
||||
0E293851285A70AC002A6E0E /* AppPreference.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E293850285A70AC002A6E0E /* AppPreference.swift */; };
|
||||
|
@ -304,6 +305,7 @@
|
|||
0E0C072A236087A100155AAC /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
0E0C072C236087C800155AAC /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
0E12BC8E27F62C8500B2F912 /* Validators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Validators.swift; sourceTree = "<group>"; };
|
||||
0E1B5F5B29C506AC00FE7D18 /* ProfileView+Diagnostics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProfileView+Diagnostics.swift"; sourceTree = "<group>"; };
|
||||
0E1C0A52238FFF97009FC087 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
0E1F5627287F0ECB00F8ADD7 /* ProviderProfileItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProviderProfileItem.swift; sourceTree = "<group>"; };
|
||||
0E1F5629287F0EEE00F8ADD7 /* ProviderProfileItem+ViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProviderProfileItem+ViewModel.swift"; sourceTree = "<group>"; };
|
||||
|
@ -655,6 +657,7 @@
|
|||
0ED30DD127EA1F650057D8A3 /* PaywallView+Purchase.swift */,
|
||||
0E44689527B051C300A14CE4 /* ProfileView.swift */,
|
||||
0E92D7C527F103300033CB7B /* ProfileView+Configuration.swift */,
|
||||
0E1B5F5B29C506AC00FE7D18 /* ProfileView+Diagnostics.swift */,
|
||||
0E92D7C827F1042A0033CB7B /* ProfileView+Extra.swift */,
|
||||
0E3CD482280DAE92007075C0 /* ProfileView+MainMenu.swift */,
|
||||
0E3B7FD927E51A0200C66F13 /* ProfileView+Provider.swift */,
|
||||
|
@ -1442,6 +1445,7 @@
|
|||
0E2A8D4F27B04BBA00207D04 /* OrganizerView.swift in Sources */,
|
||||
0E49F6BB27D7638300385834 /* EndpointAdvancedView+OpenVPN.swift in Sources */,
|
||||
0E71ACEF27C106B500F85C4B /* ProviderPresetView.swift in Sources */,
|
||||
0E1B5F5C29C506AD00FE7D18 /* ProfileView+Diagnostics.swift in Sources */,
|
||||
0EF2212F27E66F60001D0BD7 /* AddProfileView.swift in Sources */,
|
||||
0E96D2FC2871D94E005EFBCF /* DefaultLightProfileManager.swift in Sources */,
|
||||
0EF0FAF627DD0211007EB181 /* PaywallView.swift in Sources */,
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
//
|
||||
// ProfileView+Diagnostics.swift
|
||||
// Passepartout
|
||||
//
|
||||
// Created by Davide De Rosa on 3/17/23.
|
||||
// Copyright (c) 2023 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 <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import PassepartoutLibrary
|
||||
|
||||
extension ProfileView {
|
||||
struct DiagnosticsSection: View {
|
||||
@ObservedObject var currentProfile: ObservableProfile
|
||||
|
||||
var body: some View {
|
||||
Section {
|
||||
NavigationLink {
|
||||
DiagnosticsView(
|
||||
vpnProtocol: currentProfile.value.currentVPNProtocol,
|
||||
providerName: currentProfile.value.header.providerName
|
||||
)
|
||||
} label: {
|
||||
Text(L10n.Diagnostics.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -101,6 +101,7 @@ struct ProfileView: View {
|
|||
modalType: $modalType
|
||||
)
|
||||
ExtraSection(currentProfile: currentProfile)
|
||||
DiagnosticsSection(currentProfile: currentProfile)
|
||||
} else {
|
||||
ProgressView()
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@ struct SettingsView: View {
|
|||
var body: some View {
|
||||
List {
|
||||
aboutSection
|
||||
diagnosticsSection
|
||||
}.toolbar {
|
||||
themeCloseItem(presentationMode: presentationMode)
|
||||
}.themeSecondaryView()
|
||||
|
@ -76,19 +75,4 @@ struct SettingsView: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var diagnosticsSection: some View {
|
||||
profileManager.activeProfile.map { profile in
|
||||
Section {
|
||||
NavigationLink {
|
||||
DiagnosticsView(
|
||||
vpnProtocol: profile.currentVPNProtocol,
|
||||
providerName: profile.header.providerName
|
||||
)
|
||||
} label: {
|
||||
Text(L10n.Diagnostics.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue