Adds local add account view

Renames AddAccount view for clarity
This commit is contained in:
Stuart Breckenridge
2022-12-18 07:51:54 +08:00
parent 4ff0bc8f98
commit 8108f1ab0f
7 changed files with 131 additions and 21 deletions

View File

@@ -87,11 +87,11 @@ struct AddAccountListView: View {
.sheet(isPresented: $viewModel.showAddAccountSheet.0) {
switch viewModel.showAddAccountSheet.accountType {
case .onMyMac:
Text("ON MY MAC")
LocalAddAccountView()
case .cloudKit:
iCloudAccountView()
CloudKitAddAccountView()
case .freshRSS, .inoreader, .bazQux, .theOldReader:
ReaderAPIAccountView(accountType: viewModel.showAddAccountSheet.accountType, account: nil)
ReaderAPIAddAccountView(accountType: viewModel.showAddAccountSheet.accountType, account: nil)
default:
Text(viewModel.showAddAccountSheet.accountType.localizedAccountName())
}
@@ -200,7 +200,6 @@ struct AddAccountListView: View {
}
}
private func interactionDisabled(for accountType: AccountType) -> Bool {
if accountType == .cloudKit {
if AccountManager.shared.accounts.contains(where: { $0.type == .cloudKit }) {