Skip to content

Commit

Permalink
Revert "Develop to master v1.3 (#79)"
Browse files Browse the repository at this point in the history
This reverts commit 83ee9bf.
  • Loading branch information
volodymyr-chekyrta authored Sep 22, 2023
1 parent 83ee9bf commit 47a014d
Show file tree
Hide file tree
Showing 143 changed files with 3,464 additions and 3,563 deletions.
32 changes: 16 additions & 16 deletions Authorization/Authorization.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -611,7 +611,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -694,7 +694,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -721,7 +721,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -739,7 +739,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -757,7 +757,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -775,7 +775,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -793,7 +793,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -811,7 +811,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -829,7 +829,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = L8PG7LC3Y3;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.openedx.AuthorizationTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -918,7 +918,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1011,7 +1011,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1109,7 +1109,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1202,7 +1202,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1358,7 +1358,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1393,7 +1393,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ struct FieldsView: View {
type: .discovery,
fontSize: 90, screenWidth: proxy.size.width)
)
.id(UUID())
.padding(.horizontal, -6)

case .unknown:
Expand Down
33 changes: 15 additions & 18 deletions Authorization/Authorization/Presentation/Login/SignInView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ public struct SignInView: View {
VStack(alignment: .leading) {
Text(AuthLocalization.SignIn.logInTitle)
.font(Theme.Fonts.displaySmall)
.foregroundColor(Theme.Colors.textPrimary)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.padding(.bottom, 4)
Text(AuthLocalization.SignIn.welcomeBack)
.font(Theme.Fonts.titleSmall)
.foregroundColor(Theme.Colors.textPrimary)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.padding(.bottom, 20)

Text(AuthLocalization.SignIn.email)
.font(Theme.Fonts.labelLarge)
.foregroundColor(Theme.Colors.textPrimary)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
TextField(AuthLocalization.SignIn.email, text: $email)
.keyboardType(.emailAddress)
.textContentType(.emailAddress)
Expand All @@ -57,42 +57,42 @@ public struct SignInView: View {
.padding(.all, 14)
.background(
Theme.Shapes.textInputShape
.fill(Theme.Colors.textInputBackground)
.fill(CoreAssets.textInputBackground.swiftUIColor)
)
.overlay(
Theme.Shapes.textInputShape
.stroke(lineWidth: 1)
.fill(Theme.Colors.textInputStroke)
.fill(CoreAssets.textInputStroke.swiftUIColor)
)

Text(AuthLocalization.SignIn.password)
.font(Theme.Fonts.labelLarge)
.foregroundColor(Theme.Colors.textPrimary)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.padding(.top, 18)
SecureField(AuthLocalization.SignIn.password, text: $password)
.padding(.all, 14)
.background(
Theme.Shapes.textInputShape
.fill(Theme.Colors.textInputBackground)
.fill(CoreAssets.textInputBackground.swiftUIColor)
)
.overlay(
Theme.Shapes.textInputShape
.stroke(lineWidth: 1)
.fill(Theme.Colors.textInputStroke)
.fill(CoreAssets.textInputStroke.swiftUIColor)
)

HStack {
Button(AuthLocalization.SignIn.registerBtn) {
viewModel.trackSignUpClicked()
viewModel.analytics.signUpClicked()
viewModel.router.showRegisterScreen()
}.foregroundColor(Theme.Colors.accentColor)
}.foregroundColor(CoreAssets.accentColor.swiftUIColor)

Spacer()

Button(AuthLocalization.SignIn.forgotPassBtn) {
viewModel.trackForgotPasswordClicked()
viewModel.analytics.forgotPasswordClicked()
viewModel.router.showForgotPasswordScreen()
}.foregroundColor(Theme.Colors.accentColor)
}.foregroundColor(CoreAssets.accentColor.swiftUIColor)
}
.padding(.top, 10)
if viewModel.isShowProgress {
Expand All @@ -113,7 +113,7 @@ public struct SignInView: View {
}
.padding(.horizontal, 24)
.padding(.top, 50)
}.roundedBackground(Theme.Colors.background)
}.roundedBackground(CoreAssets.background.swiftUIColor)
.scrollAvoidKeyboard(dismissKeyboardByTap: true)

}
Expand All @@ -122,7 +122,7 @@ public struct SignInView: View {
if viewModel.showAlert {
VStack {
Text(viewModel.alertMessage ?? "")
.shadowCardStyle(bgColor: Theme.Colors.accentColor,
.shadowCardStyle(bgColor: CoreAssets.accentColor.swiftUIColor,
textColor: .white)
.padding(.top, 80)
Spacer()
Expand All @@ -149,10 +149,7 @@ public struct SignInView: View {
}
}
}
.hideNavigationBar()
.navigationBarBackButtonHidden(true)
.navigationBarHidden(true)
.background(Theme.Colors.background.ignoresSafeArea(.all))
.background(CoreAssets.background.swiftUIColor.ignoresSafeArea(.all))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,21 @@ public class SignInViewModel: ObservableObject {
}
}

let router: AuthorizationRouter

private let interactor: AuthInteractorProtocol
private let analytics: AuthorizationAnalytics
let router: AuthorizationRouter
let analytics: AuthorizationAnalytics
private let validator: Validator

public init(
interactor: AuthInteractorProtocol,
router: AuthorizationRouter,
analytics: AuthorizationAnalytics,
validator: Validator
) {
public init(interactor: AuthInteractorProtocol,
router: AuthorizationRouter,
analytics: AuthorizationAnalytics,
validator: Validator) {
self.interactor = interactor
self.router = router
self.analytics = analytics
self.validator = validator
}

@MainActor
func login(username: String, password: String) async {
guard validator.isValidEmail(username) else {
Expand Down Expand Up @@ -79,12 +76,4 @@ public class SignInViewModel: ObservableObject {
}
}
}

func trackSignUpClicked() {
analytics.signUpClicked()
}

func trackForgotPasswordClicked() {
analytics.forgotPasswordClicked()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SignUpView.swift
// Authorization
//
// Created by Stepanok Ivan on 24.10.2022.
// Created by  Stepanok Ivan on 24.10.2022.
//

import SwiftUI
Expand Down Expand Up @@ -43,11 +43,12 @@ public struct SignUpView: View {
CoreAssets.arrowLeft.swiftUIImage.renderingMode(.template)
.backButtonStyle(color: .white)
})
.foregroundColor(Theme.Colors.styledButtonText)
.foregroundColor(CoreAssets.styledButtonText.swiftUIColor)

}.frame(minWidth: 0,
maxWidth: .infinity,
alignment: .topLeading)
.frameLimit()
}

GeometryReader { proxy in
Expand All @@ -57,11 +58,11 @@ public struct SignUpView: View {

Text(AuthLocalization.SignUp.title)
.font(Theme.Fonts.displaySmall)
.foregroundColor(Theme.Colors.textPrimary)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.padding(.bottom, 4)
Text(AuthLocalization.SignUp.subtitle)
.font(Theme.Fonts.titleSmall)
.foregroundColor(Theme.Colors.textPrimary)
.foregroundColor(CoreAssets.textPrimary.swiftUIColor)
.padding(.bottom, 20)

let requiredFields = viewModel.fields.filter {$0.field.required}
Expand All @@ -79,7 +80,7 @@ public struct SignUpView: View {
router: viewModel.router,
configuration: viewModel.config,
cssInjector: viewModel.cssInjector,
proxy: proxy).padding(.horizontal, 1)
proxy: proxy)
}, label: {
Text(disclosureGroupOpen
? AuthLocalization.SignUp.hideFields
Expand All @@ -95,9 +96,9 @@ public struct SignUpView: View {
} else {
StyledButton(AuthLocalization.SignUp.createAccountBtn) {
Task {
viewModel.analytics.createAccountClicked()
await viewModel.registerUser()
}
viewModel.trackCreateAccountClicked()
}
.padding(.top, 40)
.padding(.bottom, 80)
Expand All @@ -108,7 +109,7 @@ public struct SignUpView: View {
.padding(.horizontal, 24)
.padding(.top, 24)

}.roundedBackground(Theme.Colors.background)
}.roundedBackground(CoreAssets.background.swiftUIColor)
.onRightSwipeGesture {
viewModel.router.back()
}
Expand All @@ -135,8 +136,7 @@ public struct SignUpView: View {
}
}
}
.background(Theme.Colors.background.ignoresSafeArea(.all))
.hideNavigationBar()
.background(CoreAssets.background.swiftUIColor.ignoresSafeArea(.all))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public class SignUpViewModel: ObservableObject {
@Published var fields: [FieldConfiguration] = []

let router: AuthorizationRouter
let analytics: AuthorizationAnalytics
let config: Config
let cssInjector: CSSInjector

private let interactor: AuthInteractorProtocol
private let analytics: AuthorizationAnalytics
private let validator: Validator

public init(
Expand Down Expand Up @@ -106,8 +106,4 @@ public class SignUpViewModel: ObservableObject {
}
}
}

func trackCreateAccountClicked() {
analytics.createAccountClicked()
}
}
Loading

0 comments on commit 47a014d

Please sign in to comment.