mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
fix naming on wallet type page (#3279)
* fix naming on wallet type page * add long press copy to tx history amount
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:cake_wallet/entities/new_ui_entities/list_item/list_item.dart';
|
||||
import 'package:cake_wallet/entities/new_ui_entities/list_item/list_item_regular_row.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/copy_wrapper.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/receive_page/receive_top_bar.dart';
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/transaction_details/confirmations_list_item.dart';
|
||||
@@ -81,9 +82,17 @@ class _TransactionDetailsModalState extends State<TransactionDetailsModal> {
|
||||
widget.transactionDetailsViewModel.formattedStatus,
|
||||
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(
|
||||
widget.transactionDetailsViewModel.formattedCryptoAmount,
|
||||
style: TextStyle(fontSize: 28),
|
||||
CopyWrapper(
|
||||
requireLongPress: true,
|
||||
data: ClipboardData(text: widget.transactionDetailsViewModel.formattedCryptoAmount),
|
||||
builder: (context, copied)=> AnimatedSwitcher(
|
||||
duration: Duration(milliseconds: 300),
|
||||
child: Text(
|
||||
key: ValueKey(copied),
|
||||
copied ? S.of(context).copied : widget.transactionDetailsViewModel.formattedCryptoAmount,
|
||||
style: TextStyle(fontSize: 28, color: copied ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.onSurface),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
|
||||
@@ -9,12 +9,14 @@ class CopyWrapper extends StatefulWidget {
|
||||
const CopyWrapper(
|
||||
{super.key,
|
||||
this.data,
|
||||
this.requireLongPress = false,
|
||||
this.isSensitive = false,
|
||||
required this.builder,
|
||||
this.duration = const Duration(milliseconds: 1200)});
|
||||
|
||||
final ClipboardData? data;
|
||||
final bool isSensitive;
|
||||
final bool requireLongPress;
|
||||
final Widget Function(BuildContext, bool) builder;
|
||||
final Duration duration;
|
||||
|
||||
@@ -40,7 +42,8 @@ class _CopyWrapperState extends State<CopyWrapper> {
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: handleCopy,
|
||||
onTap: widget.requireLongPress ? null : handleCopy,
|
||||
onLongPress: !widget.requireLongPress ? null : handleCopy,
|
||||
child: widget.builder(context, copied),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
|
||||
),
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 18),
|
||||
padding: const EdgeInsets.only(left: 18, right: 18, bottom: 12),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceContainer,
|
||||
@@ -172,10 +172,10 @@ class WalletTypeFormState extends State<WalletTypeForm> {
|
||||
imageUrl: curr.iconPath,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(curr.fullName ?? curr.name),
|
||||
Text(walletTypeToDisplayName(item)),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
curr.title,
|
||||
walletTypeToDisplayTicker(item),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user