commit 0f3a9235c6a31c6814846bba2642d29226f2feae
parent 885fcb4437514a6d10f648230f2e0735bbfaea7d
Author: Marc Stibane <marc@taler.net>
Date: Sun, 1 Mar 2026 22:10:15 +0100
Done for bank edit
Diffstat:
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Views/HelperViews/Buttons.swift b/TalerWallet1/Views/HelperViews/Buttons.swift
@@ -139,6 +139,26 @@ struct QRButton : View {
}
}
+struct DoneButton : View {
+ let titleStr: String?
+ let accessibilityLabelStr: String
+ let action: () -> Void
+
+ var body: some View {
+ Button(action: action) {
+ if let titleStr {
+ Text(titleStr)
+ .tint(.accentColor)
+ } else {
+ Image(systemName: "checkmark")
+ }
+ }
+ .tint(.accentColor)
+ .talerFont(.title)
+ .accessibilityLabel(accessibilityLabelStr)
+ }
+}
+
struct PlusButton : View {
let accessibilityLabelStr: String
let action: () -> Void
diff --git a/TalerWallet1/Views/Settings/Bank/BankEditView.swift b/TalerWallet1/Views/Settings/Bank/BankEditView.swift
@@ -114,6 +114,12 @@ struct BankEditView: View {
let _ = Self._printChanges()
// let _ = symLog.vlog() // just to get the # to compare it with .onAppear & onDisappear
#endif
+ let titleStr = String(localized: "Done", comment: "Done button")
+ let a11yLabelStr = String(localized: "Done", comment: "a11y for the Done button")
+ let doneButton = DoneButton(titleStr: titleStr, accessibilityLabelStr: a11yLabelStr) {
+ dismissTop(stack.push())
+ }
+
let methods = [PaytoType.iban, PaytoType.xTalerBank]
List {
if kycCompleted // || true
@@ -214,6 +220,7 @@ struct BankEditView: View {
.padding(.top)
}.listRowSeparator(.hidden)
} // List
+ .navigationBarItems(trailing: doneButton)
.onChange(of: focus) { [focus] newState in
switch focus {
case .none: