aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Stibane <marc@taler.net>2024-04-05 21:56:34 +0200
committerMarc Stibane <marc@taler.net>2024-04-05 21:56:34 +0200
commitb0461d9ded3dd826e95f409042de67ae329cce4f (patch)
treefbf427c65a4ccf88279731eaabd04a438efbfbc6
parentfd71359a6ce634b57ecad3e06d4c36b537000283 (diff)
downloadtaler-ios-b0461d9ded3dd826e95f409042de67ae329cce4f.tar.gz
taler-ios-b0461d9ded3dd826e95f409042de67ae329cce4f.tar.bz2
taler-ios-b0461d9ded3dd826e95f409042de67ae329cce4f.zip
Settings: add Payment Services
-rw-r--r--TalerWallet1/Views/Settings/SettingsView.swift24
1 files changed, 19 insertions, 5 deletions
diff --git a/TalerWallet1/Views/Settings/SettingsView.swift b/TalerWallet1/Views/Settings/SettingsView.swift
index ae1e0d9..7fce205 100644
--- a/TalerWallet1/Views/Settings/SettingsView.swift
+++ b/TalerWallet1/Views/Settings/SettingsView.swift
@@ -19,6 +19,7 @@ import LocalConsole
struct SettingsView: View {
private let symLog = SymLogV(0)
let stack: CallStack
+ @Binding var balances: [Balance]
let navTitle: String
@EnvironmentObject private var controller: Controller
@@ -100,6 +101,19 @@ struct SettingsView: View {
SettingsItem(name: aboutStr, id1: "about",
description: hideDescriptions ? nil : String(localized: "More info about this app...")) {}
}
+
+ let exchangesTitle = String(localized: "TitleExchanges", defaultValue: "Payment Services")
+ let exchangesDest = LazyView {
+ ExchangeListView(stack: stack.push(exchangesTitle),
+ balances: $balances,
+ navTitle: exchangesTitle)
+ }
+ NavigationLink { // whole row like in a tableView
+ exchangesDest
+ } label: {
+ SettingsItem(name: exchangesTitle, id1: "exchanges",
+ description: hideDescriptions ? nil : String(localized: "Manage payment service providers...")) {}
+ }
SettingsToggle(name: String(localized: "Minimalistic"), value: $minimalistic, id1: "minimal",
description: hideDescriptions ? nil : String(localized: "Omit text where possible")) {
hideDescriptions = minimalistic //withAnimation { hideDescriptions = minimalistic }
@@ -349,9 +363,9 @@ struct SettingsView: View {
}
// MARK: -
#if DEBUG
-struct SettingsView_Previews: PreviewProvider {
- static var previews: some View {
- SettingsView(stack: CallStack("Preview"), navTitle: "Settings")
- }
-}
+//struct SettingsView_Previews: PreviewProvider {
+// static var previews: some View {
+// SettingsView(stack: CallStack("Preview"), balances: <#Binding<[Balance]>#>, navTitle: "Settings")
+// }
+//}
#endif