mirror of
https://github.com/yattee/yattee.git
synced 2025-12-14 20:18:15 +00:00
Add Piped support
This commit is contained in:
@@ -5,12 +5,14 @@ struct SignInRequiredView<Content: View>: View {
|
||||
let title: String
|
||||
let content: Content
|
||||
|
||||
@EnvironmentObject<InvidiousAPI> private var api
|
||||
@Default(.instances) private var instances
|
||||
@EnvironmentObject<AccountsModel> private var accounts
|
||||
|
||||
#if !os(macOS)
|
||||
@EnvironmentObject<NavigationModel> private var navigation
|
||||
#endif
|
||||
|
||||
@Default(.instances) private var instances
|
||||
|
||||
init(title: String, @ViewBuilder content: @escaping () -> Content) {
|
||||
self.title = title
|
||||
self.content = content()
|
||||
@@ -18,7 +20,7 @@ struct SignInRequiredView<Content: View>: View {
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
if api.signedIn {
|
||||
if accounts.signedIn {
|
||||
content
|
||||
} else {
|
||||
prompt
|
||||
|
||||
Reference in New Issue
Block a user