change background color of sign in modal (ios)

This commit is contained in:
Satindar Dhillon 2022-07-28 14:17:03 -07:00
parent 6a100051ac
commit 7dc1722ad2
2 changed files with 42 additions and 35 deletions

View file

@ -32,29 +32,36 @@ struct EmailLoginView: View {
var body: some View {
NavigationView {
VStack(spacing: 0) {
VStack(spacing: 28) {
ScrollView(showsIndicators: false) {
if horizontalSizeClass == .regular {
Spacer(minLength: 150)
}
VStack(alignment: .center, spacing: 16) {
VStack(spacing: 16) {
ZStack {
Color.appBackground.edgesIgnoringSafeArea(.all)
VStack(spacing: 0) {
VStack(spacing: 28) {
ScrollView(showsIndicators: false) {
if horizontalSizeClass == .regular {
Spacer(minLength: 150)
}
VStack {
VStack(alignment: .leading, spacing: 6) {
Text("Email")
.font(.appFootnote)
.foregroundColor(.appGrayText)
TextField("", text: $email)
.textContentType(.emailAddress)
.textInputAutocapitalization(.never)
.disableAutocorrection(true)
}
.padding(.bottom, 8)
VStack(alignment: .leading, spacing: 6) {
Text("Password")
.font(.appFootnote)
.foregroundColor(.appGrayText)
TextField("", text: $password)
SecureField("", text: $password)
.textContentType(.password)
.textInputAutocapitalization(.never)
.disableAutocorrection(true)
}
.padding(.bottom, 16)
Button(
action: {
@ -73,24 +80,37 @@ struct EmailLoginView: View {
if let loginError = viewModel.loginError {
LoginErrorMessageView(loginError: loginError)
}
HStack {
Button(
action: { print("switch to email signup") },
label: {
Text("Don't have an account?")
.foregroundColor(.appGrayTextContrast)
.underline()
}
)
.padding(.vertical)
Spacer()
}
}
.textFieldStyle(StandardTextFieldStyle())
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.frame(maxWidth: .infinity, maxHeight: .infinity)
Spacer()
Spacer()
}
}
}
.frame(maxWidth: 300)
.navigationTitle("Sign In")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .barTrailing) {
Button(
action: { presentationMode.wrappedValue.dismiss() },
label: { Image(systemName: "xmark").foregroundColor(.appGrayTextContrast) }
)
.frame(maxWidth: 300)
.navigationTitle("Sign In")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .barTrailing) {
Button(
action: { presentationMode.wrappedValue.dismiss() },
label: { Image(systemName: "xmark").foregroundColor(.appGrayTextContrast) }
)
}
}
}
}

View file

@ -63,17 +63,4 @@ public extension AppEnvironment {
return URL(string: "http://localhost:3000")!
}
}
var highlightsServerBaseURL: URL {
switch self {
case .dev:
return URL(string: devHighlightsServerURL)!
case .demo:
return URL(string: demoHighlightsServerURL)!
case .prod:
return URL(string: prodHighlightsServerURL)!
case .test, .local:
return URL(string: "http://localhost:8080")!
}
}
}