Skip to content

Commit

Permalink
fix: updated onboarding (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldavidw authored Jun 16, 2024
1 parent 4bb2912 commit dcb6f99
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Chronos/App/Onboarding/RestoreBackupView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct RestoreBackupView: View {
.font(.system(size: 44))
.padding(.bottom, 16)

Text("Re-enter the master key used to setup Chronos previously")
Text("Re-enter the master password used to setup Chronos previously")
.fixedSize(horizontal: false, vertical: true)
.multilineTextAlignment(.center)
.font(.subheadline)
Expand Down
16 changes: 13 additions & 3 deletions Chronos/App/Onboarding/WelcomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ struct WelcomeView: View {
var body: some View {
NavigationStack {
VStack {
Image("Logo")
.resizable()
.frame(width: 128, height: 128)
.padding(.bottom, 8)

Button {
getStartedPressed.toggle()
getStartedPressed = true
} label: {
Text("Get started")
.bold()
Expand All @@ -27,20 +32,21 @@ struct WelcomeView: View {
.buttonStyle(.bordered)

Button {
restorePressed.toggle()
restorePressed = true
} label: {
Text("Restore")
.bold()
.frame(minWidth: 0, maxWidth: .infinity)
.frame(height: 32)
}
.padding(.top, 4)
.disabled(chronosCryptos.isEmpty)
.buttonStyle(.borderless)
.padding(.bottom, 32)
}
.padding([.horizontal], 24)
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
.background(Color(red: 0.04, green: 0, blue: 0.11))
.navigationTitle("Welcome")
.navigationBarTitleDisplayMode(.inline)
.navigationDestination(isPresented: $getStartedPressed) {
StorageSetupView()
Expand All @@ -54,3 +60,7 @@ struct WelcomeView: View {
})
}
}

#Preview {
WelcomeView()
}
4 changes: 4 additions & 0 deletions Chronos/App/Privacy/PrivacyView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ struct PrivacyView: View {
.background(Color(red: 0.04, green: 0, blue: 0.11))
}
}

#Preview {
PrivacyView()
}
4 changes: 2 additions & 2 deletions Chronos/App/Tabs/Tokens/AddToken/AddManualTokenView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ struct AddManualTokenView: View {
LabeledContent("Account") {
TextField("Account", text: $account)
.disableAutocorrection(true)
.autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/)
.autocapitalization(/*@START_MENU_TOKEN@*/ .none/*@END_MENU_TOKEN@*/)
}
LabeledContent("Secret") {
Group {
if showSecret {
TextField("Secret", text: $secret)
.disableAutocorrection(true)
.autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/)
.autocapitalization(/*@START_MENU_TOKEN@*/ .none/*@END_MENU_TOKEN@*/)
} else {
SecureField("Secret", text: $secret)
}
Expand Down
4 changes: 2 additions & 2 deletions Chronos/App/Tabs/Tokens/Row/UpdateTokenView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ struct UpdateTokenView: View {
LabeledContent("Account") {
TextField("Account", text: $account)
.disableAutocorrection(true)
.autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/)
.autocapitalization(/*@START_MENU_TOKEN@*/ .none/*@END_MENU_TOKEN@*/)
}
LabeledContent("Secret") {
Group {
if showSecret {
TextField("Secret", text: $secret)
.disableAutocorrection(true)
.autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/)
.autocapitalization(/*@START_MENU_TOKEN@*/ .none/*@END_MENU_TOKEN@*/)
} else {
SecureField("Secret", text: $secret)
.disabled(true)
Expand Down

0 comments on commit dcb6f99

Please sign in to comment.