More UI Changes? Not sure why they didn't go previously

This commit is contained in:
2026-03-20 02:06:19 -05:00
parent efec14139c
commit 2110c13ea1
24 changed files with 1688 additions and 70 deletions

View File

@@ -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)