diff --git a/apple/OmnivoreKit/Sources/App/Views/Registration/EmailAuth/EmailLoginFormView.swift b/apple/OmnivoreKit/Sources/App/Views/Registration/EmailAuth/EmailLoginFormView.swift index eceda710a..0e859efa0 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Registration/EmailAuth/EmailLoginFormView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Registration/EmailAuth/EmailLoginFormView.swift @@ -29,6 +29,7 @@ struct EmailLoginFormView: View { case email, password } + @EnvironmentObject var dataService: DataService @Environment(\.horizontalSizeClass) var horizontalSizeClass @Environment(\.openURL) var openURL @EnvironmentObject var authenticator: Authenticator @@ -85,7 +86,7 @@ struct EmailLoginFormView: View { }, label: { Text("Submit") } ) - .buttonStyle(SolidCapsuleButtonStyle(color: .appDeepBackground, width: 300)) + .buttonStyle(SolidCapsuleButtonStyle(color: .appCtaYellow, width: 300)) if let loginError = viewModel.loginError { LoginErrorMessageView(loginError: loginError) @@ -108,7 +109,12 @@ struct EmailLoginFormView: View { HStack { Button( action: { - openURL(URL(string: "https://omnivore.app/auth/forgot-password")!) + let url: URL = { + var urlComponents = URLComponents() + urlComponents.path = "/auth/forgot-password" + return urlComponents.url(relativeTo: dataService.appEnvironment.webAppBaseURL)! + }() + openURL(url) }, label: { Text("Forgot your password?") diff --git a/apple/OmnivoreKit/Sources/App/Views/Registration/EmailAuth/EmailSignupFormView.swift b/apple/OmnivoreKit/Sources/App/Views/Registration/EmailAuth/EmailSignupFormView.swift index 4c25b8305..086c6a90c 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Registration/EmailAuth/EmailSignupFormView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Registration/EmailAuth/EmailSignupFormView.swift @@ -176,7 +176,7 @@ struct EmailSignupFormView: View { }, label: { Text("Submit") } ) - .buttonStyle(SolidCapsuleButtonStyle(color: .appDeepBackground, width: 300)) + .buttonStyle(SolidCapsuleButtonStyle(color: .appCtaYellow, width: 300)) if let loginError = viewModel.loginError { LoginErrorMessageView(loginError: loginError) diff --git a/apple/OmnivoreKit/Sources/Views/Buttons/ButtonStyles.swift b/apple/OmnivoreKit/Sources/Views/Buttons/ButtonStyles.swift index 443aee68c..336dd22d0 100644 --- a/apple/OmnivoreKit/Sources/Views/Buttons/ButtonStyles.swift +++ b/apple/OmnivoreKit/Sources/Views/Buttons/ButtonStyles.swift @@ -13,12 +13,17 @@ public struct SolidCapsuleButtonStyle: ButtonStyle { public func makeBody(configuration: Configuration) -> some View { configuration.label - .font(.appBody) + .font(.appHeadline) .foregroundColor(textColor) - .padding(10) + .padding(12) .frame(width: width) - .background(Capsule().foregroundColor(backgroundColor)) + .background(backgroundColor) .opacity(configuration.isPressed ? 0.7 : 1.0) + .cornerRadius(8) + .overlay( + RoundedRectangle(cornerRadius: 8) + .stroke(backgroundColor, lineWidth: 1) + ) } } diff --git a/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift b/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift index 847b25826..4f8c60afa 100644 --- a/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift +++ b/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift @@ -8,11 +8,13 @@ public extension Color { static var appGrayBorder: Color { Color("_grayBorder", bundle: .module) } static var appGraySolid: Color { Color("_graySolid", bundle: .module) } static var appGrayText: Color { Color("_grayText", bundle: .module) } + static var appCtaYellow: Color { Color("_ctaYellow", bundle: .module) } static var appGrayTextContrast: Color { Color("_grayTextContrast", bundle: .module) } // Catalog Colors static var appYellow48: Color { Color("_yellow48", bundle: .module) } static var appYellow96: Color { Color("_yellow96", bundle: .module) } + static var appButtonBackground: Color { Color("_buttonBackground", bundle: .module) } static var appTextDefault: Color { Color("_utilityTextDefault", bundle: .module) } static var appPrimaryBackground: Color { Color("_appPrimaryBackground", bundle: .module) } diff --git a/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_ctaYellow.colorset/Contents.json b/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_ctaYellow.colorset/Contents.json new file mode 100644 index 000000000..b352ae789 --- /dev/null +++ b/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_ctaYellow.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x34", + "green" : "0xD2", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x34", + "green" : "0xD2", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +}