update empty view screens

This commit is contained in:
Trey t
2022-03-24 11:17:37 -05:00
parent cadfac93e3
commit c1143d42ed
4 changed files with 12 additions and 16 deletions

View File

@@ -71,15 +71,15 @@ class ShowBasedOnVoteLogics {
static func getVotingTitle(onboardingData: OnboardingData) -> String {
switch ShowBasedOnVoteLogics.returnCurrentVoteStatus(onboardingData: onboardingData) {
case (false, .Today):
return "how as yesterday"
return String(localized: "add_mood_header_view_title_yesterday")
case (true, .Today):
return "how is today"
return String(localized: "add_mood_header_view_title_today")
case (false, .Previous):
let date = Calendar.current.date(byAdding: .day, value: -2, to: Date())!
return "how was \(Random.weekdayName(fromDate: date))"
return String(format: String(localized: "add_mood_header_view_title"), Random.weekdayName(fromDate: date))
case (true, .Previous):
return "how was yesterday"
return String(localized: "add_mood_header_view_title_yesterday")
}
}

View File

@@ -18,15 +18,6 @@ struct EmptyHomeView: View {
theme.currentTheme.secondaryBGColor
VStack {
Text(String(localized: "content_view_empty_title"))
.font(.title)
.foregroundColor(textColor)
.padding()
Text(String(localized: "content_view_empty_title"))
.font(.body)
.foregroundColor(textColor)
.padding()
AddMoodHeaderView(addItemHeaderClosure: { (mood, date) in
withAnimation {
viewModel.add(mood: mood, forDate: date, entryType: .header)

View File

@@ -48,8 +48,11 @@ struct MonthView: View {
if viewModel.hasNoData {
VStack {
Spacer()
EmptyHomeView(viewModel: viewModel)
Text(String(localized: "month_view_no_data"))
.font(.title)
.padding()
.fixedSize(horizontal: false, vertical: true)
.foregroundColor(textColor)
Spacer()
}
} else {