mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
UI cleanup for iOS (#2832)
* Removes remaining traces of account ID. We don't have any external users using the app _yet_ so I wanted to remove the tech debt completely before we get the app to testers * Adds logo to welcome screen * Removes "CONNECTION" section from MainView
This commit is contained in:
21
swift/apple/Firezone/Assets.xcassets/LogoText.imageset/Contents.json
vendored
Normal file
21
swift/apple/Firezone/Assets.xcassets/LogoText.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "logo-text.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
13
swift/apple/Firezone/Assets.xcassets/LogoText.imageset/logo-text.svg
vendored
Normal file
13
swift/apple/Firezone/Assets.xcassets/LogoText.imageset/logo-text.svg
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<svg width="325" height="93" viewBox="0 0 325 93" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_893_528)">
|
||||
<path d="M114.312 71V29.144H139.592V35.416H121.736V47.256H136.968V53.528H121.736V71H114.312ZM143.097 71V39.576H150.457V71H143.097ZM146.745 34.072C145.465 34.072 144.398 33.688 143.545 32.92C142.734 32.152 142.329 31.128 142.329 29.848C142.329 28.568 142.734 27.5653 143.545 26.84C144.398 26.072 145.465 25.688 146.745 25.688C148.068 25.688 149.134 26.072 149.945 26.84C150.756 27.5653 151.161 28.568 151.161 29.848C151.161 31.128 150.756 32.152 149.945 32.92C149.134 33.688 148.068 34.072 146.745 34.072ZM156.647 71V39.576H162.727L163.239 45.144H163.495C164.604 43.096 165.927 41.5387 167.463 40.472C169.042 39.3627 170.684 38.808 172.391 38.808C173.202 38.808 173.884 38.8507 174.439 38.936C174.994 39.0213 175.506 39.192 175.975 39.448L174.503 45.72C173.991 45.592 173.522 45.5067 173.095 45.464C172.668 45.3787 172.114 45.336 171.431 45.336C170.194 45.336 168.892 45.8267 167.527 46.808C166.162 47.7467 164.988 49.4107 164.007 51.8V71H156.647ZM190.201 71.768C187.257 71.768 184.59 71.128 182.201 69.848C179.854 68.5253 177.998 66.648 176.633 64.216C175.268 61.7413 174.585 58.7547 174.585 55.256C174.585 51.8427 175.289 48.92 176.697 46.488C178.105 44.0133 179.918 42.1147 182.137 40.792C184.356 39.4693 186.702 38.808 189.177 38.808C192.036 38.808 194.425 39.448 196.345 40.728C198.265 42.008 199.694 43.7787 200.633 46.04C201.614 48.2587 202.105 50.8187 202.105 53.72C202.105 54.4027 202.062 55.064 201.977 55.704C201.934 56.344 201.849 56.9627 201.721 57.56H180.089V51.928H195.577C195.577 49.6667 195.065 47.896 194.041 46.616C193.017 45.2933 191.438 44.632 189.305 44.632C188.11 44.632 186.937 44.952 185.785 45.592C184.676 46.232 183.737 47.32 182.969 48.856C182.244 50.392 181.881 52.5253 181.881 55.256C181.881 57.7307 182.308 59.7573 183.161 61.336C184.014 62.872 185.145 64.024 186.553 64.792C187.961 65.5173 189.476 65.88 191.097 65.88C192.462 65.88 193.742 65.688 194.937 65.304C196.174 64.92 197.326 64.3867 198.393 63.704L200.953 68.44C199.502 69.464 197.838 70.2747 195.961 70.872C194.126 71.4693 192.206 71.768 190.201 71.768ZM203.188 71V67.032L218.036 45.4H204.852V39.576H227.252V43.48L212.468 65.112H227.764V71H203.188ZM243.099 71.768C240.496 71.768 238.064 71.128 235.803 69.848C233.541 68.5253 231.707 66.648 230.299 64.216C228.891 61.7413 228.187 58.776 228.187 55.32C228.187 51.8213 228.891 48.856 230.299 46.424C231.707 43.9493 233.541 42.072 235.803 40.792C238.064 39.4693 240.496 38.808 243.099 38.808C245.744 38.808 248.197 39.4693 250.459 40.792C252.72 42.072 254.555 43.9493 255.963 46.424C257.371 48.856 258.075 51.8213 258.075 55.32C258.075 58.776 257.371 61.7413 255.963 64.216C254.555 66.648 252.72 68.5253 250.459 69.848C248.197 71.128 245.744 71.768 243.099 71.768ZM243.099 65.752C244.635 65.752 245.957 65.3253 247.067 64.472C248.176 63.6187 249.029 62.4027 249.627 60.824C250.224 59.2453 250.523 57.4107 250.523 55.32C250.523 53.2293 250.224 51.3947 249.627 49.816C249.029 48.2373 248.176 47.0213 247.067 46.168C245.957 45.272 244.635 44.824 243.099 44.824C241.563 44.824 240.24 45.272 239.131 46.168C238.064 47.0213 237.232 48.2373 236.635 49.816C236.037 51.3947 235.739 53.2293 235.739 55.32C235.739 57.4107 236.037 59.2453 236.635 60.824C237.232 62.4027 238.064 63.6187 239.131 64.472C240.24 65.3253 241.563 65.752 243.099 65.752ZM262.16 71V39.576H268.24L268.752 43.8H269.008C270.416 42.4347 271.952 41.2613 273.616 40.28C275.28 39.2987 277.178 38.808 279.312 38.808C282.682 38.808 285.136 39.896 286.672 42.072C288.208 44.248 288.976 47.32 288.976 51.288V71H281.616V52.248C281.616 49.6453 281.232 47.8107 280.464 46.744C279.696 45.6773 278.437 45.144 276.688 45.144C275.322 45.144 274.106 45.4853 273.04 46.168C272.016 46.808 270.842 47.768 269.52 49.048V71H262.16ZM308.276 71.768C305.332 71.768 302.665 71.128 300.276 69.848C297.929 68.5253 296.073 66.648 294.708 64.216C293.343 61.7413 292.66 58.7547 292.66 55.256C292.66 51.8427 293.364 48.92 294.772 46.488C296.18 44.0133 297.993 42.1147 300.212 40.792C302.431 39.4693 304.777 38.808 307.252 38.808C310.111 38.808 312.5 39.448 314.42 40.728C316.34 42.008 317.769 43.7787 318.708 46.04C319.689 48.2587 320.18 50.8187 320.18 53.72C320.18 54.4027 320.137 55.064 320.052 55.704C320.009 56.344 319.924 56.9627 319.796 57.56H298.164V51.928H313.652C313.652 49.6667 313.14 47.896 312.116 46.616C311.092 45.2933 309.513 44.632 307.38 44.632C306.185 44.632 305.012 44.952 303.86 45.592C302.751 46.232 301.812 47.32 301.044 48.856C300.319 50.392 299.956 52.5253 299.956 55.256C299.956 57.7307 300.383 59.7573 301.236 61.336C302.089 62.872 303.22 64.024 304.628 64.792C306.036 65.5173 307.551 65.88 309.172 65.88C310.537 65.88 311.817 65.688 313.012 65.304C314.249 64.92 315.401 64.3867 316.468 63.704L319.028 68.44C317.577 69.464 315.913 70.2747 314.036 70.872C312.201 71.4693 310.281 71.768 308.276 71.768Z" fill="#1B140E"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M66.2375 4C86.1001 20.5434 65.5376 57.2083 72.7938 72.0126C57.8826 50.6161 78.1985 32.2283 66.2375 4Z" fill="#C25700"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M77.2523 35.8429C90.235 44.2787 74.6509 64.0444 82.9475 69.1039C91.35 74.2282 90.399 52.9323 102 58.3953C89.921 54.2857 94.932 79.64 79.9646 76.2658C62.8363 72.4045 84.1376 45.1601 77.2523 35.8429Z" fill="#8D1E00"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 64.7276C26.7271 45.0266 60.4083 76.6411 76.3024 78.6166C96.743 81.1568 91.298 57.5234 101.529 58.4039C92.101 59.5408 97.76 84.2573 76.6835 85.0211C53.7302 85.853 30.8299 50.8576 2 64.7276Z" fill="#1B140E"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_893_528">
|
||||
<rect width="325" height="93" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.6 KiB |
@@ -31,16 +31,20 @@ struct AuthView: View {
|
||||
@ObservedObject var model: AuthViewModel
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Text("Welcome to Firezone").font(.largeTitle)
|
||||
|
||||
Button("Sign in") {
|
||||
Task {
|
||||
await model.signInButtonTapped()
|
||||
VStack(
|
||||
alignment: .center,
|
||||
content: {
|
||||
Image("LogoText")
|
||||
Spacer()
|
||||
Button("Sign in") {
|
||||
Task {
|
||||
await model.signInButtonTapped()
|
||||
}
|
||||
}
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
.controlSize(.large)
|
||||
Spacer()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,18 +91,22 @@ import SwiftUI
|
||||
Group {
|
||||
switch self.model.loginStatus {
|
||||
case .signedIn(let actorName):
|
||||
HStack {
|
||||
Text(actorName.isEmpty ? "Signed in" : "Signed in as")
|
||||
Spacer()
|
||||
Text(actorName)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
HStack {
|
||||
Spacer()
|
||||
Button("Sign Out") {
|
||||
self.model.signOutButtonTapped()
|
||||
if self.model.tunnelStatus == .connected {
|
||||
HStack {
|
||||
Text(actorName.isEmpty ? "Signed in" : "Signed in as")
|
||||
Spacer()
|
||||
Text(actorName)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
HStack {
|
||||
Spacer()
|
||||
Button("Sign Out") {
|
||||
self.model.signOutButtonTapped()
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
} else {
|
||||
Text(self.model.tunnelStatus.description)
|
||||
}
|
||||
case .signedOut:
|
||||
Text("Signed Out")
|
||||
@@ -111,22 +115,6 @@ import SwiftUI
|
||||
}
|
||||
}
|
||||
}
|
||||
if case .signedIn = self.model.loginStatus {
|
||||
Section(header: Text("Connection")) {
|
||||
Text(self.model.tunnelStatus.description)
|
||||
if self.model.tunnelStatus == .disconnected || self.model.tunnelStatus == .invalid {
|
||||
HStack {
|
||||
Spacer()
|
||||
Button("Reconnect") {
|
||||
Task {
|
||||
await self.model.startTunnel()
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if case .signedIn = self.model.loginStatus, self.model.tunnelStatus == .connected {
|
||||
Section(header: Text("Resources")) {
|
||||
if self.model.orderedResources.isEmpty {
|
||||
@@ -154,7 +142,7 @@ import SwiftUI
|
||||
}
|
||||
}
|
||||
.listStyle(GroupedListStyle())
|
||||
.navigationTitle("firezone")
|
||||
.navigationTitle("Firezone")
|
||||
}
|
||||
|
||||
private func copyResourceTapped(_ resource: DisplayableResources.Resource) {
|
||||
|
||||
@@ -110,14 +110,12 @@ public struct SettingsView: View {
|
||||
#endif
|
||||
|
||||
struct PlaceholderText {
|
||||
static let accountId = "account-id"
|
||||
static let authBaseURL = "Admin portal base URL"
|
||||
static let apiURL = "Control plane WebSocket URL"
|
||||
static let logFilter = "RUST_LOG-style filter string"
|
||||
}
|
||||
|
||||
struct FootnoteText {
|
||||
static let forAccount = "Your account ID is provided by your admin"
|
||||
static let forAdvanced = try! AttributedString(
|
||||
markdown: """
|
||||
**WARNING:** These settings are intended for internal debug purposes **only**. \
|
||||
|
||||
@@ -21,13 +21,6 @@ enum TunnelStoreError: Error {
|
||||
public struct TunnelProviderKeys {
|
||||
static let keyAuthBaseURLString = "authBaseURLString"
|
||||
public static let keyConnlibLogFilter = "connlibLogFilter"
|
||||
|
||||
// The following key is not added to the tunnel provider.
|
||||
// The key is defined so that the key can be removed if it exists
|
||||
// in a tunnel provider configuration. A tunnel configuration
|
||||
// created by an earlier version of the app could have this
|
||||
// key, and we use this key definition to remove it.
|
||||
static let keyAccountId = "accountId"
|
||||
}
|
||||
|
||||
final class TunnelStore: ObservableObject {
|
||||
@@ -431,7 +424,6 @@ extension NETunnelProviderManager {
|
||||
protocolConfiguration.passwordReference = tokenReference
|
||||
}
|
||||
|
||||
providerConfig.removeValue(forKey: TunnelProviderKeys.keyAccountId)
|
||||
protocolConfiguration.providerConfiguration = providerConfig
|
||||
|
||||
ensureTunnelConfigurationIsValid()
|
||||
|
||||
Reference in New Issue
Block a user