|
|
|
|
@ -125,9 +125,9 @@ struct StatsView: View { |
|
|
|
|
ProgressView() |
|
|
|
|
.progressViewStyle(CircularProgressViewStyle()) |
|
|
|
|
} else { |
|
|
|
|
HStack { |
|
|
|
|
VStack(alignment: .leading) { |
|
|
|
|
ForEach(self.model.statValues) { statValue in |
|
|
|
|
StatView(name: statValue.stat.localizedName, value: statValue.formattedValue) |
|
|
|
|
StatView(name: statValue.stat.localizedName, value: statValue.formattedValue).padding(.vertical) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -148,13 +148,19 @@ struct StatView: View { |
|
|
|
|
|
|
|
|
|
var body: some View { |
|
|
|
|
VStack(alignment: .leading) { |
|
|
|
|
Text(self.name.uppercased()).font(.caption) |
|
|
|
|
Text(self.value).font(.title) |
|
|
|
|
Text(self.name.uppercased()).font(.footnote) |
|
|
|
|
Text(self.value).font(.system(.title, weight: .bold)) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
struct StatView_Previews: PreviewProvider { |
|
|
|
|
static var previews: some View { |
|
|
|
|
StatView(name: "Duration", value: "3") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
struct StatsView_Previews: PreviewProvider { |
|
|
|
|
static var previews: some View { |
|
|
|
|
StatsView(activity: Activity.fake(context: PersistenceController.preview.container.viewContext)) |
|
|
|
|
|