taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit bb930ed435d166ed52798317528a76d17fa05ad7
parent 7f3338515b3f033ff5c9e2deeda1357cfda9a647
Author: Marc Stibane <marc@taler.net>
Date:   Sun,  7 Sep 2025 09:00:20 +0200

action type

Diffstat:
MTalerWallet1/Views/OIM/OIMEditView.swift | 1+
MTalerWallet1/Views/OIM/OIMSubjectView.swift | 2+-
MTalerWallet1/Views/OIM/OIMp2pReceiveView.swift | 2++
MTalerWallet1/Views/OIM/OIMviews.swift | 10++++++----
4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/TalerWallet1/Views/OIM/OIMEditView.swift b/TalerWallet1/Views/OIM/OIMEditView.swift @@ -81,6 +81,7 @@ struct OIMEditView: View { OIMnavBack(stack: stack.push(), chest: cash.currency.chest, + type: .sendP2P, isFinal: false, isSending: sending, action: sendAction, diff --git a/TalerWallet1/Views/OIM/OIMSubjectView.swift b/TalerWallet1/Views/OIM/OIMSubjectView.swift @@ -93,11 +93,11 @@ struct OIMSubjectView: View { let gotAction = (selectedGoal != nil) ? sendAction : nil OIMnavBack(stack: stack.push(), chest: currency.chest, + type: .sendP2P, isFinal: false, isSending: sending, action: gotAction, actDisabled: amount2?.isZero ?? true - ) { VStack { OIMtitleView(cash: cash, diff --git a/TalerWallet1/Views/OIM/OIMp2pReceiveView.swift b/TalerWallet1/Views/OIM/OIMp2pReceiveView.swift @@ -28,6 +28,7 @@ struct OIMp2pReceiveView: View { let currency = cash.currency OIMnavBack(stack: stack.push(), chest: currency.chest, + type: .requestP2P, // TODO: define receive isFinal: false, isSending: false, action: { }, @@ -63,6 +64,7 @@ struct OIMp2pReceiveView: View { .task { amount = effective amountVal = effective.centValue // TODO: centValue factor + cash.update2(amountVal) withAnimation(.basic1) { appeared = true } diff --git a/TalerWallet1/Views/OIM/OIMviews.swift b/TalerWallet1/Views/OIM/OIMviews.swift @@ -11,8 +11,8 @@ import taler_swift let OIMbuttonSize = 80.0 let OIMactionSize = 120.0 -let OIMACTION = "OIMaction" -let OIMACTION2 = "OIMaction2" +let OIMACTION = "OIMaction" // Position: trailing edge of the title row +let OIMACTION2 = "OIMaction2" // currently unused let OIMNUMBER = "OIMnumber" let OIMCHEST = "OIMchest" let OIMBACK = "OIMback" @@ -22,6 +22,7 @@ let OIMSIDE = "OIMside" struct OIMnavBack<Content: View>: View { let stack: CallStack let chest: String + let type: OIMactions let isFinal: Bool // bordered action button let isSending: Bool // move action button let action: (() -> Void)? @@ -49,7 +50,7 @@ struct OIMnavBack<Content: View>: View { } .frame(width: OIMbuttonSize, height: OIMbuttonSize) Spacer() - OIMactionButton(type: .sendP2P, + OIMactionButton(type: type, isFinal: isFinal, action: actDisabled ? nil : action) .frame(width: OIMactionSize, height: OIMbuttonSize) @@ -81,7 +82,7 @@ struct OIMtitleView: View { .opacity(INVISIBLE) .matchedGeometryEffect(id: OIMNUMBER, in: wrapper.namespace, isSource: true) .accessibilityHidden(true) - +// .border(.red) if history { Spacer() } @@ -94,6 +95,7 @@ struct OIMtitleView: View { OIMamountV(amount: secondAmount, currencyName: cash.currency.currencyStr, factor: cash.currency.factor) } // invisible - source for money (target) flying out of and back in the open chest + // Position: trailing edge of the title row OIMactionButton(type: .sendP2P, isFinal: false, action: nil) .frame(width: OIMactionSize, height: OIMbuttonSize) .disabled(true)