From cf4a0410cb760f5ceccdb3edc2d9a1a96c718b43 Mon Sep 17 00:00:00 2001 From: ivar Date: Mon, 23 Mar 2026 17:19:08 +0100 Subject: feat: add medium and large widget configurations --- Solsnu.Widget/Solsnu_Widget.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Solsnu.Widget/Solsnu_Widget.swift') diff --git a/Solsnu.Widget/Solsnu_Widget.swift b/Solsnu.Widget/Solsnu_Widget.swift index 980725e..78ad05b 100644 --- a/Solsnu.Widget/Solsnu_Widget.swift +++ b/Solsnu.Widget/Solsnu_Widget.swift @@ -18,7 +18,7 @@ struct Provider: TimelineProvider { completion(entry) } - func getTimeline(in context: Context, completion: @escaping (Timeline) -> ()) { + func getTimeline(in context: Context, completion: @escaping (Timeline) -> ()) { var entries: [SolvervEntry] = [] let currentDate = Date() @@ -67,21 +67,22 @@ struct Solsnu_WidgetEntryView : View { } struct Solsnu_Widget: Widget { - let kind: String = "Solsnu_Widget" + let kind: String = "Solsnu_Widget_Small" var body: some WidgetConfiguration { StaticConfiguration(kind: kind, provider: Provider()) { entry in if #available(iOS 17.0, *) { - Solsnu_WidgetEntryView(entry: entry) + SmallWidgetView(entry: entry) .containerBackground(.fill.tertiary, for: .widget) } else { - Solsnu_WidgetEntryView(entry: entry) + SmallWidgetView(entry: entry) .padding() .background() } } - .configurationDisplayName("My Widget") - .description("This is an example widget.") + .configurationDisplayName("Solstice Countdown") + .description("Days until next solstice or equinox") + .supportedFamilies([.systemSmall]) } } -- cgit v1.3