From a59c2400184d3eacbbeaba1514f42beb214b7de6 Mon Sep 17 00:00:00 2001 From: Lucian Cerbu Date: Wed, 18 Sep 2024 11:11:27 +0300 Subject: [PATCH] Resolved font issues found on testing Also changed text from "Register" to "Sign Up" Minor paddings added --- .../Modules/Authentication/Screens/LoginView.swift | 5 +++-- .../Authentication/Views/CustomLoginFormView.swift | 11 ++++++----- .../Authentication/Views/ErrorBannerView.swift | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Permanent/Modules/Authentication/Screens/LoginView.swift b/Permanent/Modules/Authentication/Screens/LoginView.swift index 78063c16..10de6a47 100644 --- a/Permanent/Modules/Authentication/Screens/LoginView.swift +++ b/Permanent/Modules/Authentication/Screens/LoginView.swift @@ -90,7 +90,7 @@ struct LoginView: View { .layoutPriority(0.5) } - SmallRoundButtonImageView(type: .noColor, imagePlace: .onRight, text: "Register", image: Image(.iconauthUserPlus), action: { + SmallRoundButtonImageView(type: .noColor, imagePlace: .onRight, text: "Sign Up", image: Image(.iconauthUserPlus), action: { }) .buttonStyle(NoTapAnimationStyle()) @@ -100,8 +100,9 @@ struct LoginView: View { } } .padding(Constants.Design.isPhone ? 32 : 64) - .padding(.leading, Constants.Design.isPhone ? 32 : 0) + .padding(.leading, Constants.Design.isPhone ? 0 : -16) .padding(.top, Constants.Design.isPhone ? 32 : 0) + .padding(.bottom, Constants.Design.isPhone ? 8 : 0) ErrorBannerView(message: viewModel.bannerErrorMessage, isVisible: $viewModel.showErrorBanner) } .onChange(of: viewModel.loginStatus, perform: { status in diff --git a/Permanent/Modules/Authentication/Views/CustomLoginFormView.swift b/Permanent/Modules/Authentication/Views/CustomLoginFormView.swift index 916d5d50..6ae8d389 100644 --- a/Permanent/Modules/Authentication/Views/CustomLoginFormView.swift +++ b/Permanent/Modules/Authentication/Views/CustomLoginFormView.swift @@ -19,13 +19,13 @@ struct CustomLoginFormView: View { var body: some View { VStack(spacing: 20) { - TextField("Username", text: $username) - .textStyle(UsualRegularMediumTextStyle()) + TextField("", text: $username) + .textStyle(UsualSmallXRegularTextStyle()) .placeholder(when: username.isEmpty) { Text("Email address".uppercased()) - .font(.custom("Usual", size: 10)) - .kerning(1.6) .foregroundColor(.white) + .font(.custom("Usual-Regular", size: 10)) + .kerning(1.6) .lineLimit(1) } .foregroundColor(.white) @@ -52,7 +52,8 @@ struct CustomLoginFormView: View { focusedField = .username } - SecureField("Password", text: $password) + SecureField("", text: $password) + .font(.custom("Usual-Regular", size: 14)) .foregroundColor(.white) .placeholder(when: password.isEmpty) { Text("Password".uppercased()) diff --git a/Permanent/Modules/Authentication/Views/ErrorBannerView.swift b/Permanent/Modules/Authentication/Views/ErrorBannerView.swift index ae34de9b..564196d0 100644 --- a/Permanent/Modules/Authentication/Views/ErrorBannerView.swift +++ b/Permanent/Modules/Authentication/Views/ErrorBannerView.swift @@ -74,5 +74,6 @@ struct ErrorBannerView: View { } } .padding(.horizontal, Constants.Design.isPhone ? 32 : 64) // Adjust this padding as needed for the notification's position + .padding(.leading, Constants.Design.isPhone ? 0 : -16) } }