Improve watch widget

This commit is contained in:
Christoph Hagen
2023-12-20 19:00:20 +01:00
parent ad94588b3c
commit 33d84b40db
3 changed files with 25 additions and 1 deletions

View File

@ -24,16 +24,31 @@ struct SimpleEntry: TimelineEntry {
}
struct Sesame_WidgetEntryView : View {
@Environment(\.widgetRenderingMode)
var widgetRenderingMode
@Environment(\.widgetFamily)
var widgetFamily
var entry: Provider.Entry
var body: some View {
switch widgetRenderingMode {
default:
image.unredacted()
}
}
private var image: some View {
Image(systemSymbol: .lock)
.resizable()
.aspectRatio(contentMode: .fit)
.padding()
.fontWeight(.thin)
.widgetURL(URL(string: "sesame:///open")!)
.containerBackground(.green, for: .widget)
.widgetAccentable()
}
}