fix: improve German translations and button color logic in exchange trade page (#2400)

This commit is contained in:
Konstantin Ullrich
2025-07-23 01:51:35 +03:00
committed by GitHub
parent 696699e457
commit ce5b838d96
2 changed files with 22 additions and 17 deletions
@@ -174,8 +174,12 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
onPressed: () async {
Navigator.of(context).pushNamed(Routes.exchangeTradeExternalSendPage);
},
color: Theme.of(context).colorScheme.surfaceContainer,
textColor: Theme.of(context).colorScheme.onSecondaryContainer,
color: widget.exchangeTradeViewModel.isSendable
? Theme.of(context).colorScheme.surfaceContainer
: Theme.of(context).colorScheme.primary,
textColor: widget.exchangeTradeViewModel.isSendable
? Theme.of(context).colorScheme.onSecondaryContainer
: Theme.of(context).colorScheme.onPrimary,
),
SizedBox(height: 16),
Observer(
@@ -183,18 +187,19 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
final trade = widget.exchangeTradeViewModel.trade;
final sendingState = widget.exchangeTradeViewModel.sendViewModel.state;
return widget.exchangeTradeViewModel.isSendable &&
!(sendingState is TransactionCommitted)
? LoadingPrimaryButton(
key: ValueKey('exchange_trade_page_send_from_cake_button_key'),
isDisabled: trade.inputAddress == null || trade.inputAddress!.isEmpty,
isLoading: sendingState is IsExecutingState,
onPressed: () => widget.exchangeTradeViewModel.confirmSending(),
text: S.current.send_from_cake_wallet,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
)
: Offstage();
return Offstage(
offstage: !(widget.exchangeTradeViewModel.isSendable &&
!(sendingState is TransactionCommitted)),
child: LoadingPrimaryButton(
key: ValueKey('exchange_trade_page_send_from_cake_button_key'),
isDisabled: trade.inputAddress == null || trade.inputAddress!.isEmpty,
isLoading: sendingState is IsExecutingState,
onPressed: () => widget.exchangeTradeViewModel.confirmSending(),
text: S.current.send_from_cake_wallet,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
),
);
},
),
],
+3 -3
View File
@@ -782,8 +782,8 @@
"send_error_minimum_value": "Der Mindestbetrag ist 0,01",
"send_estimated_fee": "Geschätzte Gebühr:",
"send_fee": "Gebühr:",
"send_from_cake_wallet": "Senden Sie aus Kuchenbrieftasche",
"send_from_external_wallet": "Senden Sie aus der Außenschreibe",
"send_from_cake_wallet": "Aus Cake Wallet senden",
"send_from_external_wallet": "Aus externer Wallet senden",
"send_name": "Name",
"send_new": "Neu",
"send_payjoin": "Payjoin senden",
@@ -1128,4 +1128,4 @@
"you_will_send": "Konvertieren von",
"youCanGoBackToYourDapp": "Sie können jetzt zu Ihrem Dapp zurückkehren",
"yy": "YY"
}
}