Add Welcome screen

This commit is contained in:
Arkadiusz Fal
2021-10-18 01:06:00 +02:00
parent 0d1eaaca5c
commit ec395ff2e0
16 changed files with 187 additions and 42 deletions

View File

@@ -50,29 +50,16 @@ struct SignInRequiredView<Content: View>: View {
#if !os(tvOS)
if instances.isEmpty {
openSettingsButton
OpenSettingsButton()
}
#endif
#if os(tvOS)
openSettingsButton
OpenSettingsButton()
#endif
}
.frame(minWidth: 0, maxWidth: .infinity, alignment: .center)
}
var openSettingsButton: some View {
Button(action: {
#if os(macOS)
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
#else
navigation.presentingSettings = true
#endif
}) {
Text("Open Settings")
}
.buttonStyle(.borderedProminent)
}
}
struct SignInRequiredView_Previews: PreviewProvider {