mirror of
https://github.com/yattee/yattee.git
synced 2025-12-14 03:58:14 +00:00
Add Welcome screen
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user