WIP - a lot of uncommitted work

This commit is contained in:
Trey t
2022-01-15 12:03:31 -06:00
parent 80690e4a8c
commit 64dd1855ac
31 changed files with 1024 additions and 154 deletions

View File

@@ -122,11 +122,11 @@ struct MediumWidgetView: View {
Spacer()
HStack {
Text(firstGroup.first?.date ?? Date(), formatter: formatter)
Text(firstGroup.first?.forDate ?? Date(), formatter: formatter)
.font(.system(.footnote))
Text(" - ")
.font(.system(.footnote))
Text(firstGroup.last?.date ?? Date(), formatter: formatter)
Text(firstGroup.last?.forDate ?? Date(), formatter: formatter)
.font(.system(.footnote))
}
.frame(minWidth: 0, maxWidth: .infinity)
@@ -164,11 +164,11 @@ struct LargeWidgetView: View {
Spacer()
HStack {
Text(firstGroup.first?.date ?? Date(), formatter: formatter)
Text(firstGroup.first?.forDate ?? Date(), formatter: formatter)
.font(.system(.footnote))
Text(" - ")
.font(.system(.footnote))
Text(firstGroup.last?.date ?? Date(), formatter: formatter)
Text(firstGroup.last?.forDate ?? Date(), formatter: formatter)
.font(.system(.footnote))
}
.frame(minWidth: 0, maxWidth: .infinity)
@@ -181,10 +181,10 @@ struct LargeWidgetView: View {
Spacer()
HStack {
Text(lastGroup.first?.date ?? Date(), formatter: formatter)
Text(lastGroup.first?.forDate ?? Date(), formatter: formatter)
.font(.system(.footnote))
Text(" - ")
Text(lastGroup.last?.date ?? Date(), formatter: formatter)
Text(lastGroup.last?.forDate ?? Date(), formatter: formatter)
.font(.system(.footnote))
}
.frame(minWidth: 0, maxWidth: .infinity)
@@ -244,20 +244,20 @@ struct FeelsWidget_Previews: PreviewProvider {
static var previews: some View {
Group {
FeelsWidgetEntryView(entry: SimpleEntry(date: Date(),
configuration: ConfigurationIntent(),
mood: PersistenceController.shared.randomEntries(count: 1)))
configuration: ConfigurationIntent(),
mood: PersistenceController.shared.randomEntries(count: 1)))
.previewContext(WidgetPreviewContext(family: .systemSmall))
.environment(\.sizeCategory, .small)
FeelsWidgetEntryView(entry: SimpleEntry(date: Date(),
configuration: ConfigurationIntent(),
mood: PersistenceController.shared.randomEntries(count: 3)))
configuration: ConfigurationIntent(),
mood: PersistenceController.shared.randomEntries(count: 3)))
.previewContext(WidgetPreviewContext(family: .systemMedium))
.environment(\.sizeCategory, .medium)
FeelsWidgetEntryView(entry: SimpleEntry(date: Date(),
configuration: ConfigurationIntent(),
mood: PersistenceController.shared.randomEntries(count: 10)))
configuration: ConfigurationIntent(),
mood: PersistenceController.shared.randomEntries(count: 10)))
.previewContext(WidgetPreviewContext(family: .systemLarge))
.environment(\.sizeCategory, .large)
}