update onboarding screens
This commit is contained in:
@@ -36,47 +36,43 @@ struct OnboardingDay: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
|
GeometryReader { geometry in
|
||||||
Image("average", bundle: .main)
|
VStack {
|
||||||
.foregroundColor(Color(UIColor.darkText))
|
|
||||||
.opacity(0.04)
|
|
||||||
.scaleEffect(1.2)
|
|
||||||
.padding(.bottom, 55)
|
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
VStack{
|
|
||||||
Text(String(localized: "onboarding_day_title"))
|
|
||||||
.font(.title)
|
|
||||||
.foregroundColor(Color(UIColor.white))
|
|
||||||
.padding([.trailing, .leading], 55)
|
|
||||||
.padding([.top], 25)
|
|
||||||
|
|
||||||
Picker(selection: $onboardingData.inputDay,
|
|
||||||
label: Text("")) {
|
|
||||||
ForEach(DayOptions.allCases, id: \.self) { day in
|
|
||||||
Text(day.localizedValue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.padding()
|
|
||||||
.colorScheme(.dark)
|
|
||||||
.padding([.trailing, .leading], 55)
|
|
||||||
.pickerStyle(SegmentedPickerStyle())
|
|
||||||
|
|
||||||
Text(String(localized: "onboarding_day_body"))
|
|
||||||
.font(.body)
|
|
||||||
.foregroundColor(Color(UIColor.white))
|
|
||||||
.padding([.trailing, .leading], 75)
|
|
||||||
.padding([.top], 15)
|
|
||||||
|
|
||||||
Text(previewText)
|
|
||||||
.font(.body)
|
|
||||||
.foregroundColor(Color(UIColor.white))
|
|
||||||
.padding([.trailing, .leading], 75)
|
|
||||||
.padding([.top], 15)
|
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
Image("average", bundle: .main)
|
||||||
|
.foregroundColor(Color(UIColor.darkText))
|
||||||
|
.opacity(0.04)
|
||||||
|
.scaleEffect(1.2, anchor: .trailing)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
VStack{
|
||||||
|
Text(String(localized: "onboarding_day_title"))
|
||||||
|
.font(.title)
|
||||||
|
.padding()
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
.foregroundColor(Color(UIColor.white))
|
||||||
|
|
||||||
|
|
||||||
|
Picker(selection: $onboardingData.inputDay,
|
||||||
|
label: Text("")) {
|
||||||
|
ForEach(DayOptions.allCases, id: \.self) { day in
|
||||||
|
Text(day.localizedValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
.colorScheme(.dark)
|
||||||
|
.padding([.trailing, .leading], 55)
|
||||||
|
.pickerStyle(SegmentedPickerStyle())
|
||||||
|
|
||||||
|
Text(previewText)
|
||||||
|
.font(.body)
|
||||||
|
.padding()
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
.foregroundColor(Color(UIColor.white))
|
||||||
|
}
|
||||||
|
.frame(maxWidth: geometry.size.width)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,37 +18,43 @@ struct OnboardingTime: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
|
GeometryReader { geometry in
|
||||||
Image("great", bundle: .main)
|
|
||||||
.foregroundColor(Color(UIColor.darkText))
|
|
||||||
.opacity(0.04)
|
|
||||||
.scaleEffect(1.2)
|
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
VStack {
|
VStack {
|
||||||
Text(String(localized: "onboarding_time_title"))
|
Spacer()
|
||||||
.font(.title)
|
Image("great", bundle: .main)
|
||||||
.padding([.trailing, .leading], 55)
|
.foregroundColor(Color(UIColor.darkText))
|
||||||
.padding([.top], 25)
|
.opacity(0.04)
|
||||||
.foregroundColor(Color(UIColor.white))
|
.scaleEffect(1.2, anchor: .trailing)
|
||||||
|
Spacer()
|
||||||
DatePicker("", selection: $onboardingData.date,
|
}
|
||||||
displayedComponents: .hourAndMinute)
|
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
VStack {
|
||||||
|
Text(String(localized: "onboarding_time_title"))
|
||||||
|
.font(.title)
|
||||||
|
.padding()
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
.foregroundColor(Color(UIColor.white))
|
||||||
|
|
||||||
|
DatePicker("", selection: $onboardingData.date,
|
||||||
|
displayedComponents: .hourAndMinute)
|
||||||
.scaleEffect(2)
|
.scaleEffect(2)
|
||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
.frame(minWidth: 0, maxWidth: .infinity)
|
.frame(minWidth: 0, maxWidth: .infinity)
|
||||||
.padding()
|
.padding()
|
||||||
.padding([.top, .bottom], 25)
|
.padding([.top, .bottom], 25)
|
||||||
.colorScheme(.dark)
|
.colorScheme(.dark)
|
||||||
|
|
||||||
Text(String(format: String(localized: "onboarding_time_body"),
|
Text(String(format: String(localized: "onboarding_time_body"),
|
||||||
formatter.string(from: onboardingData.date)))
|
formatter.string(from: onboardingData.date)))
|
||||||
.font(.body)
|
.font(.body)
|
||||||
.padding([.top], 15)
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
.padding([.trailing, .leading], 55)
|
.padding()
|
||||||
.foregroundColor(Color(UIColor.white))
|
.foregroundColor(Color(UIColor.white))
|
||||||
|
|
||||||
Spacer()
|
}
|
||||||
|
.frame(maxWidth: geometry.size.width)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,74 +20,62 @@ struct OnboardingWrapup: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
|
GeometryReader { geometry in
|
||||||
Image("good", bundle: .main)
|
|
||||||
.foregroundColor(Color(UIColor.darkText))
|
|
||||||
.opacity(0.04)
|
|
||||||
.scaleEffect(1.2)
|
|
||||||
.padding(.bottom, 55)
|
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
VStack {
|
VStack {
|
||||||
Spacer()
|
Spacer()
|
||||||
|
Image("good", bundle: .main)
|
||||||
|
.foregroundColor(Color(UIColor.darkText))
|
||||||
|
.opacity(0.04)
|
||||||
|
.scaleEffect(1.2, anchor: .trailing)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
|
||||||
|
VStack {
|
||||||
|
ScrollView {
|
||||||
|
|
||||||
Text(String(localized: "onboarding_wrap_up_1"))
|
Spacer()
|
||||||
.font(.title)
|
|
||||||
.foregroundColor(Color(UIColor.white))
|
Text(String(localized: "onboarding_wrap_up_1"))
|
||||||
.padding([.trailing, .leading], 55)
|
.padding()
|
||||||
.padding([.top], 15)
|
.font(.title)
|
||||||
|
.foregroundColor(Color(UIColor.white))
|
||||||
Text(formatter.string(from: onboardingData.date))
|
|
||||||
.font(.title)
|
Text(formatter.string(from: onboardingData.date))
|
||||||
.fontWeight(.bold)
|
|
||||||
.foregroundColor(Color(UIColor.white))
|
|
||||||
.padding([.trailing, .leading], 55)
|
|
||||||
.padding([.top], 15)
|
|
||||||
|
|
||||||
// Text(String(localized: "onboarding_wrap_up_2"))
|
|
||||||
// .font(.title)
|
|
||||||
// .foregroundColor(Color(UIColor.white))
|
|
||||||
// .padding([.trailing, .leading], 55)
|
|
||||||
// .padding([.top], 15)
|
|
||||||
|
|
||||||
// Text(onboardingData.title)
|
|
||||||
// .font(.title)
|
|
||||||
// .fontWeight(.bold)
|
|
||||||
// .foregroundColor(Color(UIColor.white))
|
|
||||||
// .padding([.trailing, .leading], 55)
|
|
||||||
// .padding([.top], 15)
|
|
||||||
|
|
||||||
Text(String(localized: "onboarding_wrap_up_3"))
|
|
||||||
.font(.title)
|
|
||||||
.foregroundColor(Color(UIColor.white))
|
|
||||||
.padding([.trailing, .leading], 55)
|
|
||||||
.padding([.top], 15)
|
|
||||||
|
|
||||||
Text(onboardingData.inputDay.localizedValue)
|
|
||||||
.font(.title)
|
|
||||||
.fontWeight(.bold)
|
|
||||||
.foregroundColor(Color(UIColor.white))
|
|
||||||
.padding([.trailing, .leading], 55)
|
|
||||||
.padding([.top], 15)
|
|
||||||
|
|
||||||
Button(action: {
|
|
||||||
EventLogger.log(event: "onboarding_complete")
|
|
||||||
EventLogger.log(event: "onboarding_complete_day_id",
|
|
||||||
withData: ["id": onboardingData.inputDay.rawValue])
|
|
||||||
completionClosure(onboardingData)
|
|
||||||
}, label: {
|
|
||||||
Text(String(localized: "onboarding_wrap_up_complete_button"))
|
|
||||||
.font(.title)
|
.font(.title)
|
||||||
.fontWeight(.bold)
|
.fontWeight(.bold)
|
||||||
.foregroundColor(.yellow)
|
.padding()
|
||||||
.padding(10)
|
.foregroundColor(Color(UIColor.white))
|
||||||
.padding([.leading, .trailing], 25)
|
|
||||||
.background(RoundedRectangle(cornerRadius: 10).fill().foregroundColor(Color.white))
|
Text(String(localized: "onboarding_wrap_up_3"))
|
||||||
.cornerRadius(10)
|
.font(.title)
|
||||||
})
|
.padding()
|
||||||
|
.foregroundColor(Color(UIColor.white))
|
||||||
|
|
||||||
|
Text(onboardingData.inputDay.localizedValue)
|
||||||
|
.font(.title)
|
||||||
|
.fontWeight(.bold)
|
||||||
|
.padding()
|
||||||
|
.foregroundColor(Color(UIColor.white))
|
||||||
|
|
||||||
|
Button(action: {
|
||||||
|
EventLogger.log(event: "onboarding_complete")
|
||||||
|
EventLogger.log(event: "onboarding_complete_day_id",
|
||||||
|
withData: ["id": onboardingData.inputDay.rawValue])
|
||||||
|
completionClosure(onboardingData)
|
||||||
|
}, label: {
|
||||||
|
Text(String(localized: "onboarding_wrap_up_complete_button"))
|
||||||
|
.font(.title)
|
||||||
|
.fontWeight(.bold)
|
||||||
|
.foregroundColor(.yellow)
|
||||||
|
.padding()
|
||||||
|
.background(RoundedRectangle(cornerRadius: 10).fill().foregroundColor(Color.white))
|
||||||
|
.cornerRadius(10)
|
||||||
|
})
|
||||||
.padding([.top], 65)
|
.padding([.top], 65)
|
||||||
|
}
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
}
|
}
|
||||||
.multilineTextAlignment(.center)
|
.frame(maxWidth: geometry.size.width)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.background(.yellow)
|
.background(.yellow)
|
||||||
@@ -104,7 +92,7 @@ struct OnboardingWrapup_Previews: PreviewProvider {
|
|||||||
OnboardingWrapup(onboardingData: OnboardingData(), completionClosure: { _ in
|
OnboardingWrapup(onboardingData: OnboardingData(), completionClosure: { _ in
|
||||||
|
|
||||||
})
|
})
|
||||||
.preferredColorScheme(.dark)
|
.preferredColorScheme(.dark)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
"onboarding_time_title" = "What time do you want to unlock your rating";
|
"onboarding_time_title" = "What time do you want to unlock your rating";
|
||||||
"onboarding_time_body" = "Your shit will be unlocked at %@ daily";
|
"onboarding_time_body" = "Voting will be unlocked at %@ daily, you will also recieve a notification at this time";
|
||||||
|
|
||||||
"onboarding_day_title" = "Will this rating be for current day or previous day";
|
"onboarding_day_title" = "Will this rating be for current day or previous day";
|
||||||
"onboarding_day_body" = "When you vote your vote will be for the %@";
|
"onboarding_day_body" = "When you vote your vote will be for the %@";
|
||||||
"onboarding_day_preview_text_today" = "Example: If you pick on a Tuesday, the value will be recorded for Tuesday";
|
"onboarding_day_preview_text_today" = "Example: If you pick on a Tuesday, the value will be recorded for Tuesday";
|
||||||
"onboarding_day_preview_text_yesterday" = "Example: If you pick on a Tuesday, the value will be recorded for Monday, the day before";
|
"onboarding_day_preview_text_yesterday" = "Example: If you pick on a Tuesday, the value will be recorded for Monday, the day before.";
|
||||||
"onboarding_day_options_today" = "Same Day";
|
"onboarding_day_options_today" = "Current Day";
|
||||||
"onboarding_day_options_yesterday" = "Previous Day";
|
"onboarding_day_options_yesterday" = "Previous Day";
|
||||||
|
|
||||||
"onboarding_title_title" = "What would you like the reminder to say?";
|
"onboarding_title_title" = "What would you like the reminder to say?";
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
"onboarding_wrap_up_1" = "At";
|
"onboarding_wrap_up_1" = "At";
|
||||||
"onboarding_wrap_up_2" = "you will get notified that";
|
"onboarding_wrap_up_2" = "you will get notified that";
|
||||||
"onboarding_wrap_up_3" = "and when you vote it will be counted for the";
|
"onboarding_wrap_up_3" = "you'll be notified its time to pick a mood for the";
|
||||||
"onboarding_wrap_up_complete_button" = "Complete";
|
"onboarding_wrap_up_complete_button" = "Complete";
|
||||||
|
|
||||||
"add_mood_header_view_title_today" = "How is today?";
|
"add_mood_header_view_title_today" = "How is today?";
|
||||||
|
|||||||
Reference in New Issue
Block a user