mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Extended Piped support
This commit is contained in:
@@ -3,7 +3,7 @@ import SwiftUI
|
||||
|
||||
struct AccountFormView: View {
|
||||
let instance: Instance
|
||||
var selectedAccount: Binding<Instance.Account?>?
|
||||
var selectedAccount: Binding<Account?>?
|
||||
|
||||
@State private var name = ""
|
||||
@State private var sid = ""
|
||||
@@ -134,7 +134,7 @@ struct AccountFormView: View {
|
||||
AccountValidator(
|
||||
app: .constant(instance.app),
|
||||
url: instance.url,
|
||||
account: Instance.Account(instanceID: instance.id, url: instance.url, sid: sid),
|
||||
account: Account(instanceID: instance.id, url: instance.url, sid: sid),
|
||||
id: $sid,
|
||||
isValid: $isValid,
|
||||
isValidated: $isValidated,
|
||||
|
@@ -14,8 +14,8 @@ struct AccountsSettingsView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
if instance.supportsAccounts {
|
||||
VStack {
|
||||
if instance.app.supportsAccounts {
|
||||
accounts
|
||||
} else {
|
||||
Text("Accounts are not supported for the application of this instance")
|
||||
@@ -68,7 +68,7 @@ struct AccountsSettingsView: View {
|
||||
#endif
|
||||
}
|
||||
|
||||
private func removeAccount(_ account: Instance.Account) {
|
||||
private func removeAccount(_ account: Account) {
|
||||
AccountsModel.remove(account)
|
||||
accountsChanged.toggle()
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ struct InstanceFormView: View {
|
||||
|
||||
@State private var name = ""
|
||||
@State private var url = ""
|
||||
@State private var app = Instance.App.invidious
|
||||
@State private var app = VideosApp.invidious
|
||||
|
||||
@State private var isValid = false
|
||||
@State private var isValidated = false
|
||||
@@ -75,7 +75,7 @@ struct InstanceFormView: View {
|
||||
private var formFields: some View {
|
||||
Group {
|
||||
Picker("Application", selection: $app) {
|
||||
ForEach(Instance.App.allCases, id: \.self) { app in
|
||||
ForEach(VideosApp.allCases, id: \.self) { app in
|
||||
Text(app.rawValue.capitalized).tag(app)
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ struct InstancesSettingsView: View {
|
||||
@EnvironmentObject<PlaylistsModel> private var playlists
|
||||
|
||||
@State private var selectedInstanceID: Instance.ID?
|
||||
@State private var selectedAccount: Instance.Account?
|
||||
@State private var selectedAccount: Account?
|
||||
|
||||
@State private var presentingInstanceForm = false
|
||||
@State private var savedFormInstanceID: Instance.ID?
|
||||
|
Reference in New Issue
Block a user