enhance UI for used addresses (#1337)

* enhance UI for used addresses

* Update electrum_wallet_addresses.dart

* fix tablet UI

---------

Co-authored-by: Serhii <borodenko.sv@gmail.com>
This commit is contained in:
Omar Hatem 2024-04-10 03:28:31 +02:00 committed by GitHub
parent f9679fecbe
commit 8a61ab7780
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 72 additions and 31 deletions

View file

@ -241,6 +241,8 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
final index = _addresses.indexOf(addressRecord);
_addresses.remove(addressRecord);
_addresses.insert(index, addressRecord);
updateAddressesByMatch();
}
@action

View file

@ -1,5 +1,6 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_item.dart';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
@ -81,8 +82,10 @@ class AddressCell extends StatelessWidget {
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: name.isNotEmpty ? MainAxisAlignment.spaceBetween : MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Row(
children: [
if (isChange)
Padding(
@ -106,16 +109,18 @@ class AddressCell extends StatelessWidget {
),
if (name.isNotEmpty)
Text(
'$name - ',
'$name',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: textColor,
),
),
],
),
Flexible(
child: AutoSizeText(
formattedAddress,
responsiveLayoutUtil.shouldRenderTabletUI ? address : formattedAddress,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(

View file

@ -55,7 +55,9 @@ class PrivacyPage extends BasePage {
}),
if (_privacySettingsViewModel.isAutoGenerateSubaddressesVisible)
SettingsSwitcherCell(
title: S.current.auto_generate_subaddresses,
title: _privacySettingsViewModel.isMoneroWallet
? S.current.auto_generate_subaddresses
: S.current.auto_generate_addresses,
value: _privacySettingsViewModel.isAutoGenerateSubaddressesEnabled,
onValueChange: (BuildContext _, bool value) {
_privacySettingsViewModel.setAutoGenerateSubaddresses(value);

View file

@ -46,6 +46,10 @@ abstract class ResponsiveLayoutUtilBase with Store, WidgetsBindingObserver {
(orientation == Orientation.portrait && screenWidth < screenHeight) ||
(orientation == Orientation.landscape && screenWidth < screenHeight);
}
bool get shouldRenderTabletUI {
return screenWidth > _kMobileThreshold && screenWidth < kDesktopMaxDashBoardWidthConstraint;
}
}
_ResponsiveLayoutUtil _singletonResponsiveLayoutUtil = _ResponsiveLayoutUtil();

View file

@ -44,6 +44,8 @@ abstract class PrivacySettingsViewModelBase with Store {
_wallet.type == WalletType.litecoin ||
_wallet.type == WalletType.bitcoinCash;
bool get isMoneroWallet => _wallet.type == WalletType.monero;
@computed
bool get shouldSaveRecipientAddress => _settingsStore.shouldSaveRecipientAddress;

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "PIN خطأ",
"authenticated": "تم المصادقة",
"authentication": "المصادقة",
"auto_generate_addresses": "تلقائي توليد العناوين",
"auto_generate_subaddresses": "تلقائي توليد subddresses",
"automatic": "تلقائي",
"available_balance": "الرصيد المتوفر",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Грешен PIN",
"authenticated": "Удостоверено",
"authentication": "Удостоверяване",
"auto_generate_addresses": "Автоматично генериране на адреси",
"auto_generate_subaddresses": "Автоматично генериране на подадреси",
"automatic": "Автоматично",
"available_balance": "Наличен баланс",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Nesprávný PIN",
"authenticated": "Ověřeno",
"authentication": "Ověřování",
"auto_generate_addresses": "Automatické generování adres",
"auto_generate_subaddresses": "Automaticky generovat podadresy",
"automatic": "Automatický",
"available_balance": "Dostupný zůstatek",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Falsche PIN",
"authenticated": "Authentifiziert",
"authentication": "Authentifizierung",
"auto_generate_addresses": "Automatisch generieren Adressen",
"auto_generate_subaddresses": "Unteradressen automatisch generieren",
"automatic": "Automatisch",
"available_balance": "Verfügbares Guthaben",
@ -422,8 +423,8 @@
"placeholder_transactions": "Ihre Transaktionen werden hier angezeigt",
"please_fill_totp": "Bitte geben Sie den 8-stelligen Code ein, der auf Ihrem anderen Gerät vorhanden ist",
"please_make_selection": "Bitte treffen Sie unten eine Auswahl zum Erstellen oder Wiederherstellen Ihrer Wallet.",
"please_reference_document": "Bitte verweisen Sie auf die folgenden Dokumente, um weitere Informationen zu erhalten.",
"Please_reference_document": "Weitere Informationen finden Sie in den Dokumenten unten.",
"please_reference_document": "Bitte verweisen Sie auf die folgenden Dokumente, um weitere Informationen zu erhalten.",
"please_select": "Bitte auswählen:",
"please_select_backup_file": "Bitte wählen Sie die Sicherungsdatei und geben Sie das Sicherungskennwort ein.",
"please_try_to_connect_to_another_node": "Bitte versuchen Sie, sich mit einem anderen Knoten zu verbinden",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Wrong PIN",
"authenticated": "Authenticated",
"authentication": "Authentication",
"auto_generate_addresses": "Auto generate addresses",
"auto_generate_subaddresses": "Auto generate subaddresses",
"automatic": "Automatic",
"available_balance": "Available Balance",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Contraseña PIN",
"authenticated": "Autenticados",
"authentication": "Autenticación",
"auto_generate_addresses": "Auto Generar direcciones",
"auto_generate_subaddresses": "Generar subdirecciones automáticamente",
"automatic": "Automático",
"available_balance": "Balance disponible",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Mauvais code PIN",
"authenticated": "Authentifié",
"authentication": "Authentification",
"auto_generate_addresses": "Adresses de génération automatique",
"auto_generate_subaddresses": "Générer automatiquement des sous-adresses",
"automatic": "Automatique",
"available_balance": "Solde Disponible",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "PIN na gaskiya",
"authenticated": "Ingantacce",
"authentication": "Tabbatarwa",
"auto_generate_addresses": "Adireshin Auto",
"auto_generate_subaddresses": "Saɓaƙa subaddresses ta kai tsaye",
"automatic": "Na atomatik",
"available_balance": "KUDI",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "गलत पिन",
"authenticated": "प्रमाणीकृत",
"authentication": "प्रमाणीकरण",
"auto_generate_addresses": "ऑटो उत्पन्न पते",
"auto_generate_subaddresses": "स्वचालित रूप से उप-पते उत्पन्न करें",
"automatic": "स्वचालित",
"available_balance": "उपलब्ध शेष राशि",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Pogrešan PIN",
"authenticated": "Autentificiran",
"authentication": "Autentifikacija",
"auto_generate_addresses": "Automatsko generiranje adresa",
"auto_generate_subaddresses": "Automatski generirajte podadrese",
"automatic": "Automatski",
"available_balance": "Raspoloživ iznos",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "PIN yang salah",
"authenticated": "Terotentikasi",
"authentication": "Otentikasi",
"auto_generate_addresses": "Auto menghasilkan alamat",
"auto_generate_subaddresses": "Menghasilkan subalamat secara otomatis",
"automatic": "Otomatis",
"available_balance": "Saldo Tersedia",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "PIN non corretto",
"authenticated": "Autenticato",
"authentication": "Autenticazione",
"auto_generate_addresses": "Auto Genera indirizzi",
"auto_generate_subaddresses": "Genera automaticamente sottindirizzi",
"automatic": "Automatico",
"available_balance": "Saldo Disponibile",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "間違ったPIN",
"authenticated": "認証済み",
"authentication": "認証",
"auto_generate_addresses": "Autoはアドレスを生成します",
"auto_generate_subaddresses": "Autoはサブアドレスを生成します",
"automatic": "自動",
"available_balance": "利用可能残高",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "잘못된 PIN",
"authenticated": "인증",
"authentication": "입증",
"auto_generate_addresses": "자동 생성 주소",
"auto_generate_subaddresses": "자동 생성 서브 아드 드레스",
"automatic": "자동적 인",
"available_balance": "사용 가능한 잔액",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "ပင်နံပါတ် မှားနေသည်။",
"authenticated": "အစစ်အမှန်",
"authentication": "စစ်ဆေးခြင်း",
"auto_generate_addresses": "Auto Generate လိပ်စာများ",
"auto_generate_subaddresses": "အော်တို Generate Subaddresses",
"automatic": "အလိုအလျောက်",
"available_balance": "လက်ကျန်ငွေ ရရှိနိုင်",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Incorrect PIN",
"authenticated": "Authenticated",
"authentication": "Authenticatie",
"auto_generate_addresses": "Auto -genereer adressen",
"auto_generate_subaddresses": "Automatisch subadressen genereren",
"automatic": "automatisch",
"available_balance": "Beschikbaar saldo",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Niepoprawny PIN",
"authenticated": "Uwierzytelniony",
"authentication": "Uwierzytelnianie",
"auto_generate_addresses": "Auto generują adresy",
"auto_generate_subaddresses": "Automatycznie generuj podadresy",
"automatic": "Automatyczny",
"available_balance": "Dostępne środki",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "PIN incorreto",
"authenticated": "Autenticado",
"authentication": "Autenticação",
"auto_generate_addresses": "Endereços gerados automaticamente",
"auto_generate_subaddresses": "Gerar subendereços automaticamente",
"automatic": "Automático",
"available_balance": "Saldo disponível",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Некорректный PIN",
"authenticated": "Аутентифицировано",
"authentication": "Аутентификация",
"auto_generate_addresses": "Авто генерируйте адреса",
"auto_generate_subaddresses": "Авто генерируйте Subaddresses",
"automatic": "автоматический",
"available_balance": "Доступный баланс",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "รหัสผ่านไม่ถูกต้อง",
"authenticated": "ได้รับการยืนยันสิทธิ์",
"authentication": "การยืนยันสิทธิ์",
"auto_generate_addresses": "สร้างที่อยู่อัตโนมัติ",
"auto_generate_subaddresses": "Auto สร้าง subaddresses",
"automatic": "อัตโนมัติ",
"available_balance": "ยอดคงเหลือที่ใช้งานได้",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Maling pin",
"authenticated": "Napatunayan",
"authentication": "Pagpapatunay",
"auto_generate_addresses": "Auto bumuo ng mga address",
"auto_generate_subaddresses": "Ang Auto ay bumubuo ng mga subaddresses",
"automatic": "Awtomatiko",
"available_balance": "Magagamit na balanse",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Hatalı PIN",
"authenticated": "Doğrulandı",
"authentication": "Doğrulama",
"auto_generate_addresses": "Otomatik Adres Oluşturma",
"auto_generate_subaddresses": "Alt adresleri otomatik olarak oluştur",
"automatic": "Otomatik",
"available_balance": "Kullanılabilir Bakiye",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Некоректний PIN",
"authenticated": "Аутентифіковано",
"authentication": "Аутентифікація",
"auto_generate_addresses": "Авто генерувати адреси",
"auto_generate_subaddresses": "Автоматично генерувати підадреси",
"automatic": "Автоматичний",
"available_balance": "Доступний баланс",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "غلط PIN",
"authenticated": "تصدیق شدہ",
"authentication": "تصدیق",
"auto_generate_addresses": "آٹو پیدا کرنے والے پتے",
"auto_generate_subaddresses": "آٹو سب ایڈریس تیار کرتا ہے",
"automatic": "خودکار",
"available_balance": "دستیاب بیلنس",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "Òǹkà ìdánimọ̀ àdáni kọ́ ni èyí",
"authenticated": "A ti jẹ́rìísí yín",
"authentication": "Ìfẹ̀rílàdí",
"auto_generate_addresses": "Awọn adirẹsi ṣe agbekalẹ awọn adirẹsi",
"auto_generate_subaddresses": "Aṣiṣe Ibi-Afọwọkọ",
"automatic": "Ó máa ń ṣàdédé",
"available_balance": "Ìyókù owó tó wà níbẹ̀",

View file

@ -59,6 +59,7 @@
"auth_store_incorrect_password": "PIN码错误",
"authenticated": "已认证",
"authentication": "认证方式",
"auto_generate_addresses": "自动生成地址",
"auto_generate_subaddresses": "自动生成子辅助",
"automatic": "自动的",
"available_balance": "可用余额",