Compare commits
2 Commits
ad94588b3c
...
f8fc37d7e0
Author | SHA1 | Date | |
---|---|---|---|
|
f8fc37d7e0 | ||
|
33d84b40db |
@ -25,15 +25,30 @@ struct SimpleEntry: TimelineEntry {
|
|||||||
|
|
||||||
struct Sesame_WidgetEntryView : View {
|
struct Sesame_WidgetEntryView : View {
|
||||||
|
|
||||||
|
@Environment(\.widgetRenderingMode)
|
||||||
|
var widgetRenderingMode
|
||||||
|
|
||||||
|
@Environment(\.widgetFamily)
|
||||||
|
var widgetFamily
|
||||||
|
|
||||||
var entry: Provider.Entry
|
var entry: Provider.Entry
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
switch widgetRenderingMode {
|
||||||
|
default:
|
||||||
|
image.unredacted()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private var image: some View {
|
||||||
Image(systemSymbol: .lock)
|
Image(systemSymbol: .lock)
|
||||||
.resizable()
|
.resizable()
|
||||||
.aspectRatio(contentMode: .fit)
|
.aspectRatio(contentMode: .fit)
|
||||||
.padding()
|
.padding()
|
||||||
.fontWeight(.thin)
|
.fontWeight(.thin)
|
||||||
.widgetURL(URL(string: "sesame:///open")!)
|
.widgetURL(URL(string: "sesame:///open")!)
|
||||||
|
.containerBackground(.green, for: .widget)
|
||||||
|
.widgetAccentable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
@ -58,6 +58,15 @@
|
|||||||
launchAutomaticallySubstyle = "2">
|
launchAutomaticallySubstyle = "2">
|
||||||
<BuildableProductRunnable
|
<BuildableProductRunnable
|
||||||
runnableDebuggingMode = "0">
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "E268E0802A85302000185913"
|
||||||
|
BuildableName = "Sesame-WidgetExtension.appex"
|
||||||
|
BlueprintName = "Sesame-WidgetExtension"
|
||||||
|
ReferencedContainer = "container:Sesame.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "88E197AB29EDC9BC00BF1D19"
|
BlueprintIdentifier = "88E197AB29EDC9BC00BF1D19"
|
||||||
@ -65,7 +74,7 @@
|
|||||||
BlueprintName = "Sesame-Watch Watch App"
|
BlueprintName = "Sesame-Watch Watch App"
|
||||||
ReferencedContainer = "container:Sesame.xcodeproj">
|
ReferencedContainer = "container:Sesame.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</MacroExpansion>
|
||||||
<EnvironmentVariables>
|
<EnvironmentVariables>
|
||||||
<EnvironmentVariable
|
<EnvironmentVariable
|
||||||
key = "_XCWidgetKind"
|
key = "_XCWidgetKind"
|
||||||
|
@ -57,9 +57,12 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Picker("Connection type", selection: $coordinator.connectionType) {
|
Picker("Connection type", selection: $coordinator.connectionType) {
|
||||||
ForEach(ConnectionStrategy.allCases, id: \.rawValue) { connection in
|
Text(ConnectionStrategy.local.description).tag(ConnectionStrategy.local)
|
||||||
Text(connection.description).tag(connection)
|
Text(ConnectionStrategy.remote.description).tag(ConnectionStrategy.remote)
|
||||||
}
|
Text(ConnectionStrategy.remoteFirst.description).tag(ConnectionStrategy.remoteFirst)
|
||||||
|
// ForEach(ConnectionStrategy.allCases, id: \.rawValue) { connection in
|
||||||
|
// Text(connection.description).tag(connection)
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
.pickerStyle(.segmented)
|
.pickerStyle(.segmented)
|
||||||
.padding(.horizontal, 30)
|
.padding(.horizontal, 30)
|
||||||
|
Loading…
Reference in New Issue
Block a user