More UI Changes? Not sure why they didn't go previously
This commit is contained in:
@@ -30,7 +30,7 @@ struct LoginView: View {
|
||||
.frame(height: 52)
|
||||
Text("Chemical Inventory Management")
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(Color("Brand/BrandMutedForeground"))
|
||||
.foregroundStyle(Color(.brandMutedForeground))
|
||||
}
|
||||
|
||||
// Card
|
||||
@@ -46,7 +46,7 @@ struct LoginView: View {
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.strokeBorder(Color("Brand/BrandPrimary").opacity(0.2), lineWidth: 1)
|
||||
.strokeBorder(Color(.brandPrimary).opacity(0.2), lineWidth: 1)
|
||||
)
|
||||
|
||||
SecureField("Password", text: $password)
|
||||
@@ -57,7 +57,7 @@ struct LoginView: View {
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.strokeBorder(Color("Brand/BrandPrimary").opacity(0.2), lineWidth: 1)
|
||||
.strokeBorder(Color(.brandPrimary).opacity(0.2), lineWidth: 1)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ struct LoginView: View {
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(height: 44)
|
||||
}
|
||||
.background(Color("Brand/BrandPrimary"))
|
||||
.background(Color(.brandPrimary))
|
||||
.foregroundStyle(.white)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
.disabled(email.isEmpty || password.isEmpty || isLoading || isGoogleLoading)
|
||||
@@ -91,13 +91,13 @@ struct LoginView: View {
|
||||
|
||||
HStack {
|
||||
Rectangle()
|
||||
.fill(Color("Brand/BrandPrimary").opacity(0.15))
|
||||
.fill(Color(.brandPrimary).opacity(0.15))
|
||||
.frame(height: 1)
|
||||
Text("or")
|
||||
.font(.footnote)
|
||||
.foregroundStyle(Color("Brand/BrandMutedForeground"))
|
||||
.foregroundStyle(Color(.brandMutedForeground))
|
||||
Rectangle()
|
||||
.fill(Color("Brand/BrandPrimary").opacity(0.15))
|
||||
.fill(Color(.brandPrimary).opacity(0.15))
|
||||
.frame(height: 1)
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ struct LoginView: View {
|
||||
.padding(24)
|
||||
.background(Color(UIColor.secondarySystemGroupedBackground))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 16))
|
||||
.shadow(color: Color("Brand/BrandPrimary").opacity(0.06), radius: 12, x: 0, y: 4)
|
||||
.shadow(color: Color(.brandPrimary).opacity(0.06), radius: 12, x: 0, y: 4)
|
||||
.padding(.horizontal, 24)
|
||||
|
||||
Spacer()
|
||||
@@ -174,8 +174,8 @@ struct GoogleSignInButton: View {
|
||||
ProgressView()
|
||||
.frame(maxWidth: .infinity)
|
||||
} else {
|
||||
Image(systemName: "globe")
|
||||
.foregroundStyle(Color("Brand/BrandPrimary"))
|
||||
GoogleGLogo()
|
||||
.frame(width: 18, height: 18)
|
||||
Text("Continue with Google")
|
||||
.fontWeight(.medium)
|
||||
.foregroundStyle(Color(UIColor.label))
|
||||
@@ -187,13 +187,23 @@ struct GoogleSignInButton: View {
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.strokeBorder(Color("Brand/BrandPrimary").opacity(0.25), lineWidth: 1)
|
||||
.strokeBorder(Color(.brandPrimary).opacity(0.25), lineWidth: 1)
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
|
||||
/// The four-colour Google "G" logo, matching the web app implementation.
|
||||
struct GoogleGLogo: View {
|
||||
var body: some View {
|
||||
Image("GoogleLogo")
|
||||
.resizable()
|
||||
.renderingMode(.original)
|
||||
.scaledToFit()
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
LoginView()
|
||||
.environment(AppState.shared)
|
||||
|
||||
Reference in New Issue
Block a user