CW-1125-d-euro-ui-enhancements (#2369)

* feat: enhance dEuro Savings UI and functionality with fiat support and tooltips

* feat: add "Reinvest Interest" feature and improve dEuro Savings functionality

- Implemented the "Reinvest Interest" feature for dEuro Savings.
- Updated localized strings for multiple languages.
- Enhanced error handling for insufficient gas fees.
- Incorporated loading state and tooltips in Savings Card and Interest Card.
- Improved UI responsiveness and button state management.

* feat: localize deuro tooltips

* feat: enhance dEuro Savings with reinvestment feature and localized strings

- Added "Reinvest Interest" functionality for dEuro Savings.
- Updated localized strings across multiple languages.
- Improved modal bottom sheet handling for savings add/remove operations.
- Enhanced tooltips and UI responsiveness.

* feat: improve dEuro Savings page with info chips and localized strings

* Update res/values/strings_de.arb

* fix: update dEuro action type reset in transaction handling
This commit is contained in:
Konstantin Ullrich
2025-07-11 01:36:40 +03:00
committed by GitHub
parent d67c32dff1
commit 3ba2e4283e
45 changed files with 1110 additions and 297 deletions
@@ -3,8 +3,9 @@ import 'package:flutter/material.dart';
abstract class BaseBottomSheet extends StatelessWidget {
final String titleText;
final String? titleIconPath;
final double maxHeight;
const BaseBottomSheet({required this.titleText, this.titleIconPath});
const BaseBottomSheet({required this.titleText, this.titleIconPath, this.maxHeight = 900});
Widget headerWidget(BuildContext context) {
return Column(
@@ -59,7 +60,7 @@ abstract class BaseBottomSheet extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ConstrainedBox(
constraints: BoxConstraints(maxHeight: 600),
constraints: BoxConstraints(maxHeight: maxHeight),
child: ClipRRect(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0)),
@@ -22,6 +22,7 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
final String fee;
final String feeValue;
final String feeFiatAmount;
final String? explanation;
final List<Output> outputs;
final VoidCallback onSlideComplete;
final WalletType walletType;
@@ -46,6 +47,7 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
required this.onSlideComplete,
required this.walletType,
this.change,
this.explanation,
this.isOpenCryptoPay = false,
Key? key,
}) : showScrollbar = outputs.length > 3,
@@ -87,9 +89,18 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
tileBackgroundColor: tileBackgroundColor,
),
),
if (explanation != null)
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: StandardInfoTile(
value: explanation!,
itemTitleTextStyle: itemTitleTextStyle,
tileBackgroundColor: tileBackgroundColor,
),
),
StandardTile(
itemTitle: amount,
itemValue: amountValue + ' ${currency.title}',
itemValue: '$amountValue ${currency.title}',
itemTitleTextStyle: itemTitleTextStyle,
itemSubTitle: fiatAmountValue,
itemSubTitleTextStyle: itemSubTitleTextStyle,
@@ -260,6 +271,34 @@ class StandardTile extends StatelessWidget {
}
}
class StandardInfoTile extends StatelessWidget {
const StandardInfoTile({
super.key,
required this.value,
required this.itemTitleTextStyle,
required this.tileBackgroundColor,
});
final String value;
final TextStyle itemTitleTextStyle;
final Color tileBackgroundColor;
@override
Widget build(BuildContext context) => Semantics(
container: true,
label: value,
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: tileBackgroundColor,
),
width: double.infinity,
child: Text(value, style: itemTitleTextStyle),
),
);
}
class AddressTile extends StatelessWidget {
const AddressTile({
super.key,
@@ -39,6 +39,8 @@ class InfoBottomSheet extends BaseBottomSheet {
final VoidCallback? actionRightButton;
final Key? rightActionButtonKey;
final Key? leftActionButtonKey;
final double height;
final double? contentImageSize;
InfoBottomSheet({
required String titleText,
@@ -46,9 +48,11 @@ class InfoBottomSheet extends BaseBottomSheet {
required this.currentTheme,
this.contentImage,
this.contentImageColor,
this.contentImageSize,
this.content,
this.isTwoAction = false,
this.showDontAskMeCheckbox = false,
this.height = 200,
this.onCheckboxChanged,
this.actionButtonText,
this.actionButton,
@@ -59,18 +63,22 @@ class InfoBottomSheet extends BaseBottomSheet {
this.actionRightButton,
this.rightActionButtonKey,
this.leftActionButtonKey,
}) : super(titleText: titleText, titleIconPath: titleIconPath);
double maxHeight = 900,
}) : super(titleText: titleText, titleIconPath: titleIconPath, maxHeight: maxHeight);
@override
Widget contentWidget(BuildContext context) {
return SizedBox(
height: 200,
height: height,
child: Column(
children: [
if (contentImage != null)
Expanded(
flex: 4,
child: getImage(contentImage!, imageColor: contentImageColor),
child: SizedBox(
width: contentImageSize,
child: getImage(contentImage!, imageColor: contentImageColor),
),
)
else
Container(),