changing some colors around and getting started with phone auth

This commit is contained in:
talksik
2021-12-17 14:37:50 -08:00
parent 7b345a8e98
commit 3639819d04
10 changed files with 144 additions and 87 deletions
@@ -10,9 +10,6 @@ import SwiftUI
struct InnerCircleView: View {
let universalSize = UIScreen.main.bounds
// TESTING
// users who will have a thumping thing because they sent a message
@State var usersWithNewMessage: [Int] = []
@@ -0,0 +1,60 @@
//
// PhoneVerificationView.swift
// nirvana-ios
//
// Created by Arjun Patel on 12/17/21.
//
import SwiftUI
// user can type in a phone number and then receive a text
struct PhoneVerificationView: View {
@State var phoneNumber = ""
var body: some View {
ZStack {
OnboardingTemplateView(hdrText: "Let's get you verified", imgName: "undraw_my_password_d-6-kg", bottomActArea: AnyView(
VStack {
TextField("enter phone number", text: $phoneNumber)
.background(Color.white)
Button {
print("send verification")
} label: {
Text("send verification")
.bold()
.foregroundColor(NirvanaColor.white)
.frame(maxWidth: .infinity)
.padding(.vertical, 20)
.background(NirvanaColor.teal)
.clipShape(Capsule())
.shadow(radius:10)
}
}
))
}
}
}
struct PhoneVerificationView_Previews: PreviewProvider {
static var previews: some View {
PhoneVerificationView().environmentObject(AuthSessionStore())
}
}
// another view for user to type in the sms code
struct PhoneVerificationCodeView: View {
var body: some View {
Text("Verification View")
}
}
struct PhoneVerificationCodeView_Previews: PreviewProvider {
static var previews: some View {
PhoneVerificationCodeView()
}
}
@@ -1,35 +0,0 @@
//
// PhoneVerificationView.swift
// nirvana-ios
//
// Created by Arjun Patel on 12/17/21.
//
import SwiftUI
// user can type in a phone number and then receive a text
struct PhoneVerificationView: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
struct PhoneVerificationView_Previews: PreviewProvider {
static var previews: some View {
PhoneVerificationView()
}
}
// another view for user to type in the sms code
struct PhoneVerificationCodeView: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
struct PhoneVerificationCodeView_Previews: PreviewProvider {
static var previews: some View {
PhoneVerificationCodeView()
}
}
@@ -38,28 +38,31 @@ struct OnboardingTemplateView: View {
self.bottomActionArea = bottomActArea
}
var body: some View {
VStack(spacing: 0) {
HeaderView()
var body: some View {
ZStack {
WavesGlassBackgroundView()
VStack {
self.onboardingHeaderText
VStack(spacing: 0) {
HeaderView()
self.onboardingImageView
self.onboardingActionTextView
Spacer()
self.bottomActionArea
}
.padding(.horizontal, screenWidth * 0.05)
VStack {
self.onboardingHeaderText
self.onboardingImageView
self.onboardingActionTextView
Spacer()
self.bottomActionArea
}
.padding(.horizontal, screenWidth * 0.05)
Spacer()
} //outermost vstack
.accentColor(NirvanaColor.teal)
.background(NirvanaColor.bgLightGrey)
.navigationBarHidden(true)
Spacer()
} //outermost vstack
.accentColor(NirvanaColor.teal)
.navigationBarHidden(true)
}
}
private var onboardingHeaderText: some View {
@@ -139,6 +142,6 @@ struct OnboardingTemplateView_Previews: PreviewProvider {
}
.padding(.top, 20)
)
)
).environmentObject(AuthSessionStore())
}
}
@@ -18,8 +18,8 @@ struct WavesGlassBackgroundView: View {
ZStack {
AngularGradient(
gradient: Gradient(
colors: [NirvanaColor.solidBlue, NirvanaColor.dimTeal, Color.orange, NirvanaColor.solidBlue]),
center: .center,
colors: [NirvanaColor.solidBlue, NirvanaColor.dimTeal, Color.orange.opacity(0.4), NirvanaColor.teal.opacity(0.5), NirvanaColor.teal.opacity(0.3), NirvanaColor.solidTeal.opacity(0.3), NirvanaColor.solidBlue]),
center: .bottom,
angle: .degrees(120))
LinearGradient(gradient: Gradient(
+24 -23
View File
@@ -11,30 +11,31 @@ struct WelcomeView: View {
@State var showLearnMore = false
var body: some View {
NavigationView {
OnboardingTemplateView(imgName: "undraw_friendship_mni7", mainLeadingActText: "Your", mainHighlightedActText: "minimalist", mainTrailingActText: "social media.", subActText: "Tired of the rat race on insta, snap, tik-tok, \"meta\"?", bottomActArea: AnyView(
VStack(alignment: .center) {
NavigationLink(destination: OnboardingTrioView()) {
Text("Start Your Detox")
.bold()
.foregroundColor(NirvanaColor.white)
.frame(maxWidth: .infinity)
.padding(.vertical, 20)
.background(NirvanaColor.teal)
.clipShape(Capsule())
.shadow(radius:10)
}
Link("Learn More", destination: URL(string: NirvanaConstants.landingPageUrl)!)
.font(.caption)
.foregroundColor(NirvanaColor.teal)
//learn more button to usenirvana.com
OnboardingTemplateView(imgName: "undraw_friendship_mni7", mainLeadingActText: "Your", mainHighlightedActText: "minimalist", mainTrailingActText: "social media.", subActText: "Tired of the rat race on insta, snap, tik-tok, \"meta\"?", bottomActArea: AnyView(
VStack(alignment: .center) {
Button {
print("going to the sign in page")
} label: {
Text("Start Your Detox")
.bold()
.foregroundColor(NirvanaColor.white)
.frame(maxWidth: .infinity)
.padding(.vertical, 20)
.background(NirvanaColor.teal)
.clipShape(Capsule())
.shadow(radius:10)
}
.padding(.top, 20)
)
).navigationBarHidden(true)
}.navigationBarHidden(true) // navigation view
Link("Learn More", destination: URL(string: NirvanaConstants.landingPageUrl)!)
.font(.caption)
.foregroundColor(NirvanaColor.white)
//learn more button to usenirvana.com
}
.padding(.top, 20)
)
)
} // View body
} // View