diff options
author | Marc Stibane <marc@taler.net> | 2024-04-05 21:56:34 +0200 |
---|---|---|
committer | Marc Stibane <marc@taler.net> | 2024-04-05 21:56:34 +0200 |
commit | b0461d9ded3dd826e95f409042de67ae329cce4f (patch) | |
tree | fbf427c65a4ccf88279731eaabd04a438efbfbc6 | |
parent | fd71359a6ce634b57ecad3e06d4c36b537000283 (diff) | |
download | taler-ios-b0461d9ded3dd826e95f409042de67ae329cce4f.tar.gz taler-ios-b0461d9ded3dd826e95f409042de67ae329cce4f.tar.bz2 taler-ios-b0461d9ded3dd826e95f409042de67ae329cce4f.zip |
Settings: add Payment Services
-rw-r--r-- | TalerWallet1/Views/Settings/SettingsView.swift | 24 |
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 |