Skip to content

Commit 90ce5cf

Browse files
committed
Updated login screen UI
- updated design - updated fonts - updated colors
1 parent c3c238c commit 90ce5cf

File tree

9 files changed

+178
-26
lines changed

9 files changed

+178
-26
lines changed

GoInfoGame/GoInfoGame.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
C77AAC9D2E4463ED006713B2 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = C77AAC9C2E4463ED006713B2 /* FirebaseAnalytics */; };
171171
C77AAC9F2E4463ED006713B2 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = C77AAC9E2E4463ED006713B2 /* FirebaseCrashlytics */; };
172172
C77EEBCF2DE59D3200494CB4 /* UndoMerge.swift in Sources */ = {isa = PBXBuildFile; fileRef = C77EEBCE2DE59D3200494CB4 /* UndoMerge.swift */; };
173+
C78737AF2E4C9E3B00289D13 /* FloatingLabelTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = C78737AE2E4C9E3200289D13 /* FloatingLabelTextField.swift */; };
173174
C7927B552E42363000A7A34E /* XCAssets+Generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7927B532E42363000A7A34E /* XCAssets+Generated.swift */; };
174175
C7A922252E45C36D00705E21 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = C7A922242E45C36D00705E21 /* PrivacyInfo.xcprivacy */; };
175176
C7BA83542E3C9C3600755BA7 /* QuestSyncButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7BA83532E3C9C3600755BA7 /* QuestSyncButton.swift */; };
@@ -519,6 +520,7 @@
519520
C77AAC992E446376006713B2 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
520521
C77AACA52E447364006713B2 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
521522
C77EEBCE2DE59D3200494CB4 /* UndoMerge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UndoMerge.swift; sourceTree = "<group>"; };
523+
C78737AE2E4C9E3200289D13 /* FloatingLabelTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloatingLabelTextField.swift; sourceTree = "<group>"; };
522524
C7927B532E42363000A7A34E /* XCAssets+Generated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "XCAssets+Generated.swift"; sourceTree = "<group>"; };
523525
C7A922242E45C36D00705E21 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
524526
C7BA83532E3C9C3600755BA7 /* QuestSyncButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = QuestSyncButton.swift; path = GoInfoGame/UI/Map/QuestSyncButton.swift; sourceTree = SOURCE_ROOT; };
@@ -1652,6 +1654,7 @@
16521654
FAFDA1FC2C6D322800ECEAE9 /* View */ = {
16531655
isa = PBXGroup;
16541656
children = (
1657+
C78737AE2E4C9E3200289D13 /* FloatingLabelTextField.swift */,
16551658
C77A4A252DF2AF3100DED8B0 /* SecureInputView.swift */,
16561659
FA8C74D72C60E95100D28220 /* PosmLogin.swift */,
16571660
);
@@ -2292,6 +2295,7 @@
22922295
isa = PBXSourcesBuildPhase;
22932296
buildActionMask = 2147483647;
22942297
files = (
2298+
C78737AF2E4C9E3B00289D13 /* FloatingLabelTextField.swift in Sources */,
22952299
FA9F38202DC5585600D7AABF /* QuestUndoManager.swift in Sources */,
22962300
FA8C74D42C5A443700D28220 /* QuestOptions.swift in Sources */,
22972301
A4AD130C2B5E80F20041A881 /* StoredElement.swift in Sources */,
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0xE6",
9+
"green" : "0xDB",
10+
"red" : "0xD5"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0xEE",
9+
"green" : "0xE3",
10+
"red" : "0xE7"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0x6E",
9+
"green" : "0x52",
10+
"red" : "0x42"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0x9B",
9+
"green" : "0x87",
10+
"red" : "0x83"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}

GoInfoGame/GoInfoGame/Helpers/Generated/XCAssets+Generated.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ internal enum Asset {
2828
internal enum Colors {
2929
internal static let accentLavender = ColorAsset(name: "Accent Lavender")
3030
internal static let accentPink = ColorAsset(name: "Accent Pink")
31+
internal static let borderColorGrayD5DBE6 = ColorAsset(name: "Border Color gray D5DBE6")
3132
internal static let huskyGold = ColorAsset(name: "Husky Gold")
3233
internal static let huskyPurple = ColorAsset(name: "Husky Purple")
34+
internal static let lightPurpuleBgE7E3EE = ColorAsset(name: "Light Purpule bg E7E3EE")
35+
internal static let textFieldText42526E = ColorAsset(name: "Text field text 42526E")
36+
internal static let textFiledTitle83879B = ColorAsset(name: "Text filed title 83879B")
3337
internal static let theme = ColorAsset(name: "theme")
3438
}
3539
internal enum QuestIcons {
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
//
2+
// FloatingLabelTextField.swift
3+
// GoInfoGame
4+
//
5+
// Created by Prashamsa on 13/08/25.
6+
//
7+
8+
import SwiftUI
9+
10+
struct FloatingLabelTextField: View {
11+
var title: String
12+
@Binding var text: String
13+
var isSecure: Bool = false
14+
15+
var body: some View {
16+
ZStack(alignment: .leading) {
17+
// Border box
18+
RoundedRectangle(cornerRadius: 6)
19+
.stroke(Asset.Colors.borderColorGrayD5DBE6.swiftUIColor, lineWidth: 1)
20+
.frame(height: 50)
21+
22+
if !text.isEmpty {
23+
// Floating label
24+
Text(title)
25+
.foregroundColor(Asset.Colors.textFiledTitle83879B.swiftUIColor)
26+
.background(.white)
27+
.font(FontFamily.Lato.regular.swiftUIFont(fixedSize: 16))
28+
.padding(.horizontal, 4)
29+
.offset(y: -25)
30+
}
31+
32+
33+
// TextField or SecureField
34+
if isSecure {
35+
SecureInputView(title, text: $text)
36+
.padding(.horizontal, 8)
37+
.frame(height: 50)
38+
} else {
39+
TextField(title, text: $text)
40+
.padding(.horizontal, 8)
41+
.frame(height: 50)
42+
.font(FontFamily.Lato.bold.swiftUIFont(fixedSize: 16))
43+
.foregroundStyle(Asset.Colors.textFieldText42526E.swiftUIColor)
44+
}
45+
}
46+
}
47+
}
48+
#Preview {
49+
FloatingLabelTextField(title: "Email", text: .constant(""))
50+
}

GoInfoGame/GoInfoGame/Login/View/PosmLogin.swift

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,42 @@ struct PosmLoginView: View {
2121
var body: some View {
2222
NavigationStack {
2323
ZStack {
24-
VStack(spacing: 20) {
25-
HStack {
26-
Asset.logo.swiftUIImage
27-
.resizable()
28-
.aspectRatio(contentMode: .fill)
29-
.frame(width: 80, height: 80)
30-
.padding(-10)
24+
VStack {
25+
ZStack {
26+
Asset.Colors.lightPurpuleBgE7E3EE.swiftUIColor
27+
.ignoresSafeArea(edges: .top)
28+
29+
HStack {
30+
ZStack {
31+
Asset.logo.swiftUIImage
32+
.resizable()
33+
.aspectRatio(contentMode: .fill)
34+
}
3135
.clipShape(Circle())
36+
.frame(width: 95, height: 95)
3237

33-
Group {
34-
VStack(alignment: .leading) {
35-
Text("AVIV")
36-
.font(FontFamily.FONTSPRINGDEMOProximaNova.bold.swiftUIFont(size: 30))
37-
Text("ScoutRoute")
38-
.font(FontFamily.FONTSPRINGDEMOProximaNova.bold.swiftUIFont(size: 20))
38+
Group {
39+
VStack(alignment: .leading) {
40+
Text("AVIV")
41+
.font(FontFamily.Lato.regular.swiftUIFont(size: 52))
42+
Text("ScoutRoute")
43+
.font(FontFamily.Lato.medium.swiftUIFont(size: 24))
44+
}
3945
}
46+
.foregroundColor(Asset.Colors.huskyPurple.swiftUIColor)
4047
}
41-
.foregroundColor(Asset.Colors.huskyPurple.swiftUIColor)
48+
.padding([.bottom], 50)
4249
}
43-
.padding([.bottom], 50)
50+
.frame(height: 250)
4451

45-
TextField("Username", text: $viewModel.username)
46-
.padding()
47-
.background(Color(.systemGray6))
52+
FloatingLabelTextField(title: "Username", text: $viewModel.username)
53+
.padding(10)
4854
.cornerRadius(10)
4955
.padding(.horizontal, 40)
5056
.textInputAutocapitalization(.never)
5157

52-
SecureInputView("Password", text: $viewModel.password)
53-
.padding()
54-
.background(Color(.systemGray6))
58+
FloatingLabelTextField(title: "Password", text: $viewModel.password, isSecure: true)
59+
.padding(10)
5560
.cornerRadius(10)
5661
.padding(.horizontal, 40)
5762
#if DEBUG
@@ -82,15 +87,15 @@ struct PosmLoginView: View {
8287
viewModel.performLogin(for: selectedEnvironment)
8388
}) {
8489
Text("Login")
85-
.font(.custom("Lato-Bold", size: 20))
90+
.font(FontFamily.Lato.bold.swiftUIFont(size: 20))
8691
.foregroundColor(Color.white)
92+
.frame(maxWidth: .infinity)
8793
.padding()
8894
.background(Asset.Colors.huskyPurple.swiftUIColor)
8995
.cornerRadius(25)
9096
}
9197
.padding(.top, 20)
92-
93-
appVersionText
98+
.padding(.horizontal, 40)
9499

95100
if SessionManager.shared.canUseBiometricLogin(for: selectedEnvironment) {
96101
Button(action: {
@@ -119,18 +124,23 @@ struct PosmLoginView: View {
119124
}
120125
}) {
121126
Label(BiometricAuthManager.biometricLabelText(), systemImage: BiometricAuthManager.biometricIcon())
122-
.font(.custom("Lato-Bold", size: 18))
127+
.font(FontFamily.Lato.bold.swiftUIFont(fixedSize: 18))
123128
.foregroundColor(.blue)
124129
}
130+
.padding(.top, 10)
125131
}
126132

127133
if viewModel.hasLoginFailed {
128134
Text(viewModel.loginFailedMessage ?? "Invalid Credentials")
129135
.foregroundColor(.red)
130136
.padding(.top, 10)
137+
.font(FontFamily.Lato.medium.swiftUIFont(fixedSize: 18))
131138
}
139+
140+
Spacer()
141+
appVersionText
132142
}
133-
.padding()
143+
.padding([.top], 0)
134144

135145
if viewModel.isLoading {
136146
ActivityView(activityText: "Loading...")
@@ -170,6 +180,8 @@ struct PosmLoginView: View {
170180
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "N/A"
171181
let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "N/A"
172182
return Text("Version \(version) (\(build))")
183+
.font(FontFamily.Lato.medium.swiftUIFont(size: 16))
184+
.foregroundColor(Asset.Colors.textFiledTitle83879B.swiftUIColor)
173185
}
174186
}
175187

GoInfoGame/GoInfoGame/Login/View/SecureInputView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ struct SecureInputView: View {
2626
TextField(placeholder, text: $text)
2727
}
2828
}.padding(.trailing, 32)
29+
.font(FontFamily.Lato.bold.swiftUIFont(size: 16))
30+
.foregroundStyle(Asset.Colors.textFieldText42526E.swiftUIColor)
2931

3032
Button(action: {
3133
isSecured.toggle()

0 commit comments

Comments
 (0)