WIP - a lot of uncommitted work
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user