Update version

This commit is contained in:
2026-01-16 11:28:26 +01:00
parent 7988257399
commit c6be398e5a
28 changed files with 1061 additions and 193 deletions
@@ -7,6 +7,7 @@ struct AccountsView: View {
@State private var showingAddAccount = false
@State private var selectedAccount: Account?
@State private var showingPaywall = false
@State private var accountToDelete: Account?
var body: some View {
ZStack {
@@ -33,6 +34,13 @@ struct AccountsView: View {
}
}
}
.swipeActions(edge: .trailing) {
Button(role: .destructive) {
accountToDelete = account
} label: {
Label("Delete", systemImage: "trash")
}
}
}
} header: {
Text("Accounts")
@@ -43,6 +51,25 @@ struct AccountsView: View {
.scrollContentBackground(.hidden)
}
.navigationTitle("Accounts")
.confirmationDialog(
"Delete Account",
isPresented: Binding(
get: { accountToDelete != nil },
set: { if !$0 { accountToDelete = nil } }
),
titleVisibility: .visible
) {
Button("Delete", role: .destructive) {
guard let accountToDelete else { return }
if accountStore.selectedAccount?.id == accountToDelete.id {
accountStore.selectAllAccounts()
}
accountRepository.deleteAccount(accountToDelete)
self.accountToDelete = nil
}
} message: {
Text("This will remove the account and unlink its sources.")
}
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button {