Move WelcomeView to its own view
This commit is contained in:
parent
8f4e4bc7c5
commit
c507c739bd
|
@ -7,6 +7,7 @@
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
0E065F112813269500062CAF /* WelcomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E065F102813269500062CAF /* WelcomeView.swift */; };
|
||||||
0E0BD27327B2EA2C00583AC5 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0BD27227B2EA2C00583AC5 /* MainView.swift */; };
|
0E0BD27327B2EA2C00583AC5 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0BD27227B2EA2C00583AC5 /* MainView.swift */; };
|
||||||
0E0BD27627B2EB2200583AC5 /* DonateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0BD27527B2EB2200583AC5 /* DonateView.swift */; };
|
0E0BD27627B2EB2200583AC5 /* DonateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0BD27527B2EB2200583AC5 /* DonateView.swift */; };
|
||||||
0E0BD27927B2EBE500583AC5 /* ShortcutsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0BD27827B2EBE500583AC5 /* ShortcutsView.swift */; };
|
0E0BD27927B2EBE500583AC5 /* ShortcutsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0BD27827B2EBE500583AC5 /* ShortcutsView.swift */; };
|
||||||
|
@ -184,6 +185,7 @@
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
0E065F102813269500062CAF /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = "<group>"; };
|
||||||
0E0BD27227B2EA2C00583AC5 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = "<group>"; };
|
0E0BD27227B2EA2C00583AC5 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = "<group>"; };
|
||||||
0E0BD27527B2EB2200583AC5 /* DonateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DonateView.swift; sourceTree = "<group>"; };
|
0E0BD27527B2EB2200583AC5 /* DonateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DonateView.swift; sourceTree = "<group>"; };
|
||||||
0E0BD27827B2EBE500583AC5 /* ShortcutsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShortcutsView.swift; sourceTree = "<group>"; };
|
0E0BD27827B2EBE500583AC5 /* ShortcutsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShortcutsView.swift; sourceTree = "<group>"; };
|
||||||
|
@ -456,6 +458,7 @@
|
||||||
0ED89C1B27DE3ABC008B36D6 /* ShortcutsView+Add.swift */,
|
0ED89C1B27DE3ABC008B36D6 /* ShortcutsView+Add.swift */,
|
||||||
0E71ACFA27C12E5300F85C4B /* VersionView.swift */,
|
0E71ACFA27C12E5300F85C4B /* VersionView.swift */,
|
||||||
0EF708312811CC8400A3A308 /* VPNStatusText.swift */,
|
0EF708312811CC8400A3A308 /* VPNStatusText.swift */,
|
||||||
|
0E065F102813269500062CAF /* WelcomeView.swift */,
|
||||||
);
|
);
|
||||||
path = Views;
|
path = Views;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -969,6 +972,7 @@
|
||||||
0EB4042E27CA136300378B1A /* AddingTextField.swift in Sources */,
|
0EB4042E27CA136300378B1A /* AddingTextField.swift in Sources */,
|
||||||
0EE8B7E327FF340F00B68621 /* VPNProtocolType+FileExtensions.swift in Sources */,
|
0EE8B7E327FF340F00B68621 /* VPNProtocolType+FileExtensions.swift in Sources */,
|
||||||
0EF2212B27E667EA001D0BD7 /* AddProviderView+Name.swift in Sources */,
|
0EF2212B27E667EA001D0BD7 /* AddProviderView+Name.swift in Sources */,
|
||||||
|
0E065F112813269500062CAF /* WelcomeView.swift in Sources */,
|
||||||
0E2DE71F27DCD0290067B9E1 /* TunnelKit+L10n.swift in Sources */,
|
0E2DE71F27DCD0290067B9E1 /* TunnelKit+L10n.swift in Sources */,
|
||||||
0E49F6BF27D764AF00385834 /* EndpointAdvancedView.swift in Sources */,
|
0E49F6BF27D764AF00385834 /* EndpointAdvancedView.swift in Sources */,
|
||||||
0E0BD27627B2EB2200583AC5 /* DonateView.swift in Sources */,
|
0E0BD27627B2EB2200583AC5 /* DonateView.swift in Sources */,
|
||||||
|
|
|
@ -29,8 +29,6 @@ struct MainView: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
OrganizerView()
|
OrganizerView()
|
||||||
.themePrimaryView()
|
|
||||||
|
|
||||||
ProfileView()
|
ProfileView()
|
||||||
}.themeGlobal()
|
}.themeGlobal()
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,6 +112,7 @@ struct OrganizerView: View {
|
||||||
onCompletion: onHostFileImporterResult
|
onCompletion: onHostFileImporterResult
|
||||||
).onOpenURL(perform: onOpenURL)
|
).onOpenURL(perform: onOpenURL)
|
||||||
.navigationTitle(Unlocalized.appName)
|
.navigationTitle(Unlocalized.appName)
|
||||||
|
.themePrimaryView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct ProfileView: View {
|
||||||
if isExisting {
|
if isExisting {
|
||||||
mainView
|
mainView
|
||||||
} else {
|
} else {
|
||||||
welcomeView
|
WelcomeView()
|
||||||
}
|
}
|
||||||
}.toolbar {
|
}.toolbar {
|
||||||
ToolbarItemGroup(placement: .navigationBarTrailing) {
|
ToolbarItemGroup(placement: .navigationBarTrailing) {
|
||||||
|
@ -108,12 +108,6 @@ struct ProfileView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var welcomeView: some View {
|
|
||||||
Text(L10n.Profile.Welcome.message)
|
|
||||||
.multilineTextAlignment(.center)
|
|
||||||
.themeInformativeText()
|
|
||||||
}
|
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private func presentedModal(_ modalType: ModalType) -> some View {
|
private func presentedModal(_ modalType: ModalType) -> some View {
|
||||||
switch modalType {
|
switch modalType {
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
//
|
||||||
|
// WelcomeView.swift
|
||||||
|
// Passepartout
|
||||||
|
//
|
||||||
|
// Created by Davide De Rosa on 4/22/22.
|
||||||
|
// Copyright (c) 2022 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
|
||||||
|
|
||||||
|
struct WelcomeView: View {
|
||||||
|
var body: some View {
|
||||||
|
Text(L10n.Profile.Welcome.message)
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
.themeInformativeText()
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue