changing some colors around and getting started with phone auth
This commit is contained in:
@@ -158,14 +158,13 @@
|
||||
891A15F62765639B00B26659 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
89BCABEE276D2DD6009E9B10 /* PhoneVerification */,
|
||||
89BDCDED2769B3EB00577829 /* Contacts */,
|
||||
89F1386B2767EB07006680ED /* SignIn */,
|
||||
892179E22765FE93001E6C60 /* FooterControlsView */,
|
||||
891A16052765726800B26659 /* Templates */,
|
||||
891A16042765725D00B26659 /* WelcomeView */,
|
||||
891A1608276572BB00B26659 /* HomeView */,
|
||||
89BCABEA276D2A07009E9B10 /* PhoneVerificationView.swift */,
|
||||
89BCABEC276D2B05009E9B10 /* WavesGlassBackgroundView.swift */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
@@ -184,6 +183,7 @@
|
||||
children = (
|
||||
891A15FE27656F9200B26659 /* HeaderView.swift */,
|
||||
89288ECA27675B9F00E962C4 /* OnboardingTemplateView.swift */,
|
||||
89BCABEC276D2B05009E9B10 /* WavesGlassBackgroundView.swift */,
|
||||
);
|
||||
path = Templates;
|
||||
sourceTree = "<group>";
|
||||
@@ -248,6 +248,14 @@
|
||||
path = InnerCircle;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
89BCABEE276D2DD6009E9B10 /* PhoneVerification */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
89BCABEA276D2A07009E9B10 /* PhoneVerificationView.swift */,
|
||||
);
|
||||
path = PhoneVerification;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
89BDCDE827697F6100577829 /* UserMenu */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "undraw_my_password_d-6-kg.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
+1
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 14 KiB |
@@ -6,19 +6,20 @@
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import NavigationStack
|
||||
|
||||
struct ContentView: View {
|
||||
@EnvironmentObject var authSessionStore: AuthSessionStore
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
NavigationStackView {
|
||||
switch self.authSessionStore.sessionState {
|
||||
case SessionState.isAuthenticated:
|
||||
HomeView()
|
||||
case SessionState.isLoggedOut:
|
||||
WelcomeView()
|
||||
}
|
||||
}.animation(.default, value:authSessionStore.sessionState)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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(
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user