commit 49c8f0342dec98e340299ab14c4bfac2b41d1235
parent 731c6f1db84032e133029346c25e31a1fdd3f235
Author: Marc Stibane <marc@taler.net>
Date: Sat, 13 Jul 2024 23:50:27 +0200
Spend button with icon
Diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/TalerWallet1/Views/Balances/BalancesSectionView.swift b/TalerWallet1/Views/Balances/BalancesSectionView.swift
@@ -108,10 +108,18 @@ extension BalancesSectionView: View {
}
if showSpendingButton {
let title = String(localized: "LinkTitle_DEMOSHOP", defaultValue: "Spend demo money")
- Button(title) {
+ let action = {
showSpendingHint = false
UIApplication.shared.open(URL(string:DEMOSHOP)!, options: [:])
}
+ Button(action: action) {
+ HStack {
+ ButtonIconBadge(type: .payment, foreColor: .accentColor, done: false)
+ Spacer()
+ Text(title)
+ Spacer()
+ }
+ }
.buttonStyle(TalerButtonStyle(type: .bordered, narrow: false, aligned: .center))
.accessibilityHint(String(localized: "Will go to the demo shop website."))
.listRowSeparator(.hidden)