Skip to content

Commit

Permalink
Remove phone login and add email login
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-amisha-i committed Dec 11, 2024
1 parent a11e6e0 commit 4b311cb
Show file tree
Hide file tree
Showing 35 changed files with 621 additions and 2,324 deletions.
8 changes: 0 additions & 8 deletions BaseStyle/BaseStyle.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
D82C65552C46886E009947DC /* Roboto-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D82C65502C46886E009947DC /* Roboto-Bold.ttf */; };
D82C65562C46886E009947DC /* Roboto-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D82C65512C46886E009947DC /* Roboto-Medium.ttf */; };
D8302D9C2B9EE1D2005ACA13 /* PrimaryFloatingButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8302D9B2B9EE1D2005ACA13 /* PrimaryFloatingButton.swift */; };
D86632962C2410BB009D3EF5 /* OtpTextInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D86632952C2410BB009D3EF5 /* OtpTextInputView.swift */; };
D887213F2B99992A009DC5BE /* LoaderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D887213E2B99992A009DC5BE /* LoaderViewModel.swift */; };
D89C933F2BC3C0F800FACD16 /* ForwardIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89C933E2BC3C0F800FACD16 /* ForwardIcon.swift */; };
D89C93462BC42DE500FACD16 /* MailComposeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89C93452BC42DE500FACD16 /* MailComposeView.swift */; };
D89DBE2D2B88828300E5F1BD /* Countries.json in Resources */ = {isa = PBXBuildFile; fileRef = D89DBE2C2B88828300E5F1BD /* Countries.json */; };
D89DBE332B888F2D00E5F1BD /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89DBE322B888F2D00E5F1BD /* SearchBar.swift */; };
D89DBE352B88A05F00E5F1BD /* UIApplication+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89DBE342B88A05F00E5F1BD /* UIApplication+Extension.swift */; };
D89DBE3E2B8C67CE00E5F1BD /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89DBE3D2B8C67CE00E5F1BD /* String+Extension.swift */; };
Expand Down Expand Up @@ -90,11 +88,9 @@
D82C65502C46886E009947DC /* Roboto-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Bold.ttf"; sourceTree = "<group>"; };
D82C65512C46886E009947DC /* Roboto-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Medium.ttf"; sourceTree = "<group>"; };
D8302D9B2B9EE1D2005ACA13 /* PrimaryFloatingButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrimaryFloatingButton.swift; sourceTree = "<group>"; };
D86632952C2410BB009D3EF5 /* OtpTextInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OtpTextInputView.swift; sourceTree = "<group>"; };
D887213E2B99992A009DC5BE /* LoaderViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LoaderViewModel.swift; path = BaseStyle/Views/LoaderViewModel.swift; sourceTree = SOURCE_ROOT; };
D89C933E2BC3C0F800FACD16 /* ForwardIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForwardIcon.swift; sourceTree = "<group>"; };
D89C93452BC42DE500FACD16 /* MailComposeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MailComposeView.swift; sourceTree = "<group>"; };
D89DBE2C2B88828300E5F1BD /* Countries.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Countries.json; sourceTree = "<group>"; };
D89DBE322B888F2D00E5F1BD /* SearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = "<group>"; };
D89DBE342B88A05F00E5F1BD /* UIApplication+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Extension.swift"; sourceTree = "<group>"; };
D89DBE3D2B8C67CE00E5F1BD /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -233,7 +229,6 @@
children = (
D8D42A562B85CD42009B345D /* BaseAssets.xcassets */,
D8D42A892B85D525009B345D /* AppColors.swift */,
D89DBE2C2B88828300E5F1BD /* Countries.json */,
D8D42A582B85CDB2009B345D /* Fonts */,
);
path = Resource;
Expand Down Expand Up @@ -309,7 +304,6 @@
D8D42AAF2B872E44009B345D /* LoaderView.swift */,
D8D14A4F2BA090F000F45FF2 /* ShareSheetView.swift */,
D89C93452BC42DE500FACD16 /* MailComposeView.swift */,
D86632952C2410BB009D3EF5 /* OtpTextInputView.swift */,
D82174BD2BBAD86D00DB42C3 /* ProfileImageView.swift */,
D8E244C02B986CD800C6C82A /* ImagePickerView.swift */,
);
Expand Down Expand Up @@ -412,7 +406,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D89DBE2D2B88828300E5F1BD /* Countries.json in Resources */,
D82C65532C46886E009947DC /* Lato-Medium.ttf in Resources */,
D82C65552C46886E009947DC /* Roboto-Bold.ttf in Resources */,
D82C65562C46886E009947DC /* Roboto-Medium.ttf in Resources */,
Expand Down Expand Up @@ -526,7 +519,6 @@
21D26E232CA199630090488B /* CapsuleButton.swift in Sources */,
D89C93462BC42DE500FACD16 /* MailComposeView.swift in Sources */,
213A1F2A2C52335D00BF9800 /* CheckmarkButton.swift in Sources */,
D86632962C2410BB009D3EF5 /* OtpTextInputView.swift in Sources */,
D8E244C12B986CD800C6C82A /* ImagePickerView.swift in Sources */,
D8D42A862B85D08F009B345D /* Font+Extension.swift in Sources */,
D8EB0ED82CAD8C9F00AC6A44 /* ErrorView.swift in Sources */,
Expand Down
12 changes: 10 additions & 2 deletions BaseStyle/BaseStyle/CustomUI/Buttons/PrimaryFloatingButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ public struct PrimaryFloatingButton: View {

private let text: String
private let bottomPadding: CGFloat
private var bgColor: Color
private var textColor: Color
private let isEnabled: Bool
private let showLoader: Bool
private let onClick: (() -> Void)?

public init(text: String, bottomPadding: CGFloat = 24, isEnabled: Bool = true, showLoader: Bool = false, onClick: (() -> Void)? = nil) {
public init(text: String, bottomPadding: CGFloat = 24, textColor: Color = primaryLightText,
bgColor: Color = primaryColor, isEnabled: Bool = true,
showLoader: Bool = false, onClick: (() -> Void)? = nil) {
self.text = text
self.bottomPadding = bottomPadding
self.textColor = textColor
self.bgColor = bgColor
self.isEnabled = isEnabled
self.showLoader = showLoader
self.onClick = onClick
Expand All @@ -27,7 +33,9 @@ public struct PrimaryFloatingButton: View {
VStack(alignment: .center, spacing: 0) {
VSpacer(10)

PrimaryButton(text: text, isEnabled: !showLoader && isEnabled, showLoader: showLoader, onClick: onClick)
PrimaryButton(text: text, textColor: textColor, bgColor: bgColor,
isEnabled: !showLoader && isEnabled,
showLoader: showLoader, onClick: onClick)
}
.padding(.horizontal, 16)
.padding(.bottom, bottomPadding)
Expand Down
61 changes: 0 additions & 61 deletions BaseStyle/BaseStyle/CustomUI/OtpTextInputView.swift

This file was deleted.

4 changes: 0 additions & 4 deletions BaseStyle/BaseStyle/Extension/String+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ extension String {
return emailPred.evaluate(with: self)
}

public func getNumbersOnly() -> String {
self.filter("0123456789".contains)
}

public func randomString(length: Int) -> String {
let letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
return String((0..<length).compactMap { _ in letters.randomElement() })
Expand Down
Loading

0 comments on commit 4b311cb

Please sign in to comment.