Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement - updated the DashboardView row appearance #361

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,24 @@ struct DashboardView: View {
NavigationStack {
List {
ForEach(viewModel.searchedEvents) { event in
VStack(alignment: .leading, spacing: 8) {
VStack(alignment: .leading, spacing: 4) {
Text(event.title)
.font(.title3)
.fontWeight(.bold)

Text(event.date, formatter: self.eventDateFormat)
.foregroundStyle(.secondary)

let vehicleName = viewModel.vehicles.first { $0.id == event.vehicleID }?.name
if let vehicleName {
Text("\(vehicleName) on \(event.date, formatter: self.eventDateFormat)",
comment: "Maintenance list item for a vehicle on a date")
Text("For: \(vehicleName)", comment: "the vehcile name is filled in here")
.foregroundStyle(.secondary)
}

if !event.notes.isEmpty {
Text(event.notes)
.lineLimit(0)
Text("Notes:")
.foregroundStyle(.secondary)
Text(event.notes)
}
}
.accessibilityElement(children: .combine)
Expand Down
64 changes: 6 additions & 58 deletions Basic-Car-Maintenance/Shared/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -72,64 +72,6 @@
}
}
},
"%@ on %@" : {
"comment" : "Maintenance list item for a vehicle on a date",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "%1$@ on %2$@"
}
},
"fa" : {
"stringUnit" : {
"state" : "translated",
"value" : "%1$@ در %2$@"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
"value" : "%1$@ z datą %2$@"
}
}
}
},
"%lld %@" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "%1$lld %2$@"
}
},
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "%1$lld %2$@"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
"value" : "%1$lld %2$@"
}
},
"tr" : {
"stringUnit" : {
"state" : "translated",
"value" : "%1$lld %2$@"
}
},
"uk" : {
"stringUnit" : {
"state" : "translated",
"value" : "%1$lld %2$@"
}
}
}
},
"🦄 Mikaela Caron - Maintainer" : {
"comment" : "Link to maintainer Github account.",
"localizations" : {
Expand Down Expand Up @@ -2679,6 +2621,9 @@
}
}
},
"For: %@" : {
"comment" : "the vehcile name is filled in here"
},
"GitHub Repo" : {
"comment" : "Link to the Basic Car Maintenance GitHub repo.",
"localizations" : {
Expand Down Expand Up @@ -3638,6 +3583,9 @@
}
}
}
},
"Notes:" : {

},
"Odometer" : {
"localizations" : {
Expand Down
Loading