Skip to content

Commit 814b00b

Browse files
committed
Updated compose notes screen with new design
1 parent 8f6868b commit 814b00b

File tree

4 files changed

+47
-22
lines changed

4 files changed

+47
-22
lines changed

GoInfoGame/GoInfoGame/Helpers/Generated/Strings+Generated.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ internal enum L10n {
1515
internal static let appName = L10n.tr("Localizable", "App Name", fallback: "AVIV ScoutRoute")
1616
/// Can't Say
1717
internal static let cantSay = L10n.tr("Localizable", "cant_say", fallback: "Can't Say")
18+
/// Compose a note
19+
internal static let composeANote = L10n.tr("Localizable", "Compose a note", fallback: "Compose a note")
20+
/// Compose message
21+
internal static let composeMessage = L10n.tr("Localizable", "Compose message", fallback: "Compose message")
1822
/// Don't show again for this session
1923
internal static let dontShowAgain = L10n.tr("Localizable", "dont_show_again", fallback: "Don't show again for this session")
2024
/// My Profile

GoInfoGame/GoInfoGame/UI/Map/AddFeatureView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ struct AddFeatureView: View {
120120
.padding()
121121
.frame(width: 155, height: 46)
122122
.background(selectedFeature?.name != nil ? Asset.Colors.huskyPurple.swiftUIColor : Color.gray)
123-
.cornerRadius(20)
123+
.cornerRadius(23)
124124
}
125125
}
126126
.disabled(selectedFeature?.name == nil)

GoInfoGame/GoInfoGame/UI/Map/CreateNoteView.swift

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import SwiftUI
99
import CoreLocation
1010

1111
struct CreateNoteView: View {
12-
12+
@Environment(\.presentationMode) var presentationMode
1313
@State var coordinates: CLLocationCoordinate2D
1414
@State private var noteText = ""
1515
@Binding var showNotesBox: Bool
@@ -21,13 +21,43 @@ struct CreateNoteView: View {
2121
var body: some View {
2222
ZStack {
2323
VStack(alignment: .leading, spacing: 10) {
24-
TextEditor(text: $noteText)
25-
.padding(10)
26-
.background(Color(.systemGray6))
27-
.cornerRadius(8)
28-
.padding(.horizontal, 20)
24+
HStack {
25+
Text(L10n.Localizable.composeANote)
26+
.font(FontFamily.Lato.bold.swiftUIFont(fixedSize: 18))
27+
.foregroundStyle(Asset.Colors._42526ETextFieldText.swiftUIColor)
28+
.padding()
29+
30+
Spacer()
31+
32+
Button {
33+
presentationMode.wrappedValue.dismiss()
34+
} label: {
35+
Image(systemName: "xmark.circle")
36+
.font(FontFamily.Lato.bold.swiftUIFont(size: 24))
37+
.foregroundStyle(Asset.Colors._83879BTextFiledTitle.swiftUIColor)
38+
.padding()
39+
}
40+
41+
}
42+
43+
ZStack(alignment: .topLeading) {
44+
TextEditor(text: $noteText)
45+
.padding(2)
46+
.background(Asset.Colors.f5F5F5LightGrayBackground.swiftUIColor)
47+
.cornerRadius(8)
48+
.padding()
49+
50+
if noteText.isEmpty {
51+
Text(L10n.Localizable.composeMessage)
52+
.foregroundColor(Asset.Colors._83879BTextFiledTitle.swiftUIColor)
53+
.padding()
54+
.padding(.top, 10)
55+
.padding(.leading, 5)
56+
}
57+
}
2958

3059
HStack {
60+
Spacer()
3161
Button(action: {
3262
Task {
3363
do {
@@ -41,27 +71,16 @@ struct CreateNoteView: View {
4171
ProgressView()
4272
} else {
4373
Text("Submit")
44-
.font(.custom("Lato-Bold", size: 16))
74+
.font(FontFamily.Lato.bold.swiftUIFont(size: 20))
4575
.foregroundColor(.white)
4676
.padding()
47-
.frame(maxWidth: .infinity)
77+
.frame(width: 156, height: 46)
4878
.background(noteText != "" ? Asset.Colors.huskyPurple.swiftUIColor : Color.gray)
49-
.cornerRadius(9)
79+
.cornerRadius(23)
5080
}
5181
}
5282
.disabled(noteText == "")
53-
54-
Button (action: {
55-
showNotesBox = false
56-
}) {
57-
Text("Cancel")
58-
.font(.custom("Lato-Bold", size: 16))
59-
.foregroundColor(.white)
60-
.padding()
61-
.frame(maxWidth: .infinity)
62-
.background(Asset.Colors.accentPink.swiftUIColor)
63-
.cornerRadius(9)
64-
}
83+
Spacer()
6584
}
6685
.padding(.horizontal, 20)
6786
}

GoInfoGame/GoInfoGame/en.lproj/Localizable.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,5 @@
107107
"Preferences" = "Preferences";
108108
"My Profile" = "My Profile";
109109
"Workspace" = "Workspace";
110+
"Compose a note" = "Compose a note";
111+
"Compose message" = "Compose message";

0 commit comments

Comments
 (0)