mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
CWA-215 | applied new design to address book page
This commit is contained in:
parent
8769e93025
commit
3f1bb416d4
17 changed files with 179 additions and 109 deletions
BIN
assets/images/2.0x/litecoin.png
Normal file
BIN
assets/images/2.0x/litecoin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
assets/images/3.0x/litecoin.png
Normal file
BIN
assets/images/3.0x/litecoin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
BIN
assets/images/litecoin.png
Normal file
BIN
assets/images/litecoin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 941 B |
|
@ -29,6 +29,8 @@ class S implements WidgetsLocalizations {
|
||||||
String get add_new_word => "Add new word";
|
String get add_new_word => "Add new word";
|
||||||
String get address_book => "Address Book";
|
String get address_book => "Address Book";
|
||||||
String get address_book_menu => "Address book";
|
String get address_book_menu => "Address book";
|
||||||
|
String get address_remove_contact => "Remove contact";
|
||||||
|
String get address_remove_content => "Are you sure that you want to remove selected contact?";
|
||||||
String get all => "ALL";
|
String get all => "ALL";
|
||||||
String get amount => "Amount: ";
|
String get amount => "Amount: ";
|
||||||
String get amount_is_estimate => "The receive amount is an estimate";
|
String get amount_is_estimate => "The receive amount is an estimate";
|
||||||
|
@ -766,6 +768,8 @@ class $de extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "Handelsgeschichte";
|
String get trade_history_title => "Handelsgeschichte";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "Kontakt entfernen";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "Der Wallet darf nur Buchstaben und Zahlen enthalten\nund muss zwischen 1 und 15 Zeichen lang sein";
|
String get error_text_wallet_name => "Der Wallet darf nur Buchstaben und Zahlen enthalten\nund muss zwischen 1 und 15 Zeichen lang sein";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "Stellen Sie Ihr Wallet von generiert wieder her Tastenanschläge, die von Ihren privaten Schlüsseln gespeichert wurden";
|
String get restore_description_from_keys => "Stellen Sie Ihr Wallet von generiert wieder her Tastenanschläge, die von Ihren privaten Schlüsseln gespeichert wurden";
|
||||||
|
@ -836,6 +840,8 @@ class $de extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "OK";
|
String get ok => "OK";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "Sind Sie sicher, dass Sie den ausgewählten Kontakt entfernen möchten?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Monero Wallet";
|
String get wallet_list_title => "Monero Wallet";
|
||||||
@override
|
@override
|
||||||
String get authentication => "Authentifizierung";
|
String get authentication => "Authentifizierung";
|
||||||
|
@ -1378,6 +1384,8 @@ class $hi extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "व्यापार का इतिहास";
|
String get trade_history_title => "व्यापार का इतिहास";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "संपर्क हटाये";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "वॉलेट नाम में केवल अक्षर, संख्याएं हो सकती हैं\nऔर 1 और 15 वर्णों के बीच लंबा होना चाहिए";
|
String get error_text_wallet_name => "वॉलेट नाम में केवल अक्षर, संख्याएं हो सकती हैं\nऔर 1 और 15 वर्णों के बीच लंबा होना चाहिए";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "अपने वॉलेट को जेनरेट से पुनर्स्थापित करें आपकी निजी कुंजी से कीस्ट्रोक्स सहेजे गए";
|
String get restore_description_from_keys => "अपने वॉलेट को जेनरेट से पुनर्स्थापित करें आपकी निजी कुंजी से कीस्ट्रोक्स सहेजे गए";
|
||||||
|
@ -1448,6 +1456,8 @@ class $hi extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "ठीक है";
|
String get ok => "ठीक है";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "क्या आप वाकई चयनित संपर्क को हटाना चाहते हैं?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Monero बटुआ";
|
String get wallet_list_title => "Monero बटुआ";
|
||||||
@override
|
@override
|
||||||
String get authentication => "प्रमाणीकरण";
|
String get authentication => "प्रमाणीकरण";
|
||||||
|
@ -1990,6 +2000,8 @@ class $ru extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "История сделок";
|
String get trade_history_title => "История сделок";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "Удалить контакт";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "Имя кошелька может содержать только буквы, цифры\nи должно быть от 1 до 15 символов в длину";
|
String get error_text_wallet_name => "Имя кошелька может содержать только буквы, цифры\nи должно быть от 1 до 15 символов в длину";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "Вы можете восстановить кошелёк с помощью приватных ключей";
|
String get restore_description_from_keys => "Вы можете восстановить кошелёк с помощью приватных ключей";
|
||||||
|
@ -2060,6 +2072,8 @@ class $ru extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "OK";
|
String get ok => "OK";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "Вы уверены, что хотите удалить выбранный контакт?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Monero Кошелёк";
|
String get wallet_list_title => "Monero Кошелёк";
|
||||||
@override
|
@override
|
||||||
String get authentication => "Аутентификация";
|
String get authentication => "Аутентификация";
|
||||||
|
@ -2602,6 +2616,8 @@ class $ko extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "무역 역사";
|
String get trade_history_title => "무역 역사";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "연락처 삭제";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "지갑 이름은 문자, 숫자 만 포함 할 수 있습니다\n1 ~ 15 자 사이 여야합니다";
|
String get error_text_wallet_name => "지갑 이름은 문자, 숫자 만 포함 할 수 있습니다\n1 ~ 15 자 사이 여야합니다";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "개인 키에서 저장된 생성 된 키 스트로크에서 월렛 복원";
|
String get restore_description_from_keys => "개인 키에서 저장된 생성 된 키 스트로크에서 월렛 복원";
|
||||||
|
@ -2672,6 +2688,8 @@ class $ko extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "승인";
|
String get ok => "승인";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "선택한 연락처를 삭제 하시겠습니까?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "모네로 월렛";
|
String get wallet_list_title => "모네로 월렛";
|
||||||
@override
|
@override
|
||||||
String get authentication => "입증";
|
String get authentication => "입증";
|
||||||
|
@ -3214,6 +3232,8 @@ class $pt extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "Histórico de trocas";
|
String get trade_history_title => "Histórico de trocas";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "Remover contato";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "O nome da carteira só pode conter letras, números\ne deve ter entre 1 e 15 caracteres";
|
String get error_text_wallet_name => "O nome da carteira só pode conter letras, números\ne deve ter entre 1 e 15 caracteres";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "Restaure sua carteira a partir de suas chaves privadas";
|
String get restore_description_from_keys => "Restaure sua carteira a partir de suas chaves privadas";
|
||||||
|
@ -3284,6 +3304,8 @@ class $pt extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "Ok";
|
String get ok => "Ok";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "Tem certeza de que deseja remover o contato selecionado?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Carteira Monero";
|
String get wallet_list_title => "Carteira Monero";
|
||||||
@override
|
@override
|
||||||
String get authentication => "Autenticação";
|
String get authentication => "Autenticação";
|
||||||
|
@ -3826,6 +3848,8 @@ class $uk extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "Історія операцій";
|
String get trade_history_title => "Історія операцій";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "Видалити контакт";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "Ім'я гаманця може містити тільки букви, цифри\nі повинно бути від 1 до 15 символів в довжину";
|
String get error_text_wallet_name => "Ім'я гаманця може містити тільки букви, цифри\nі повинно бути від 1 до 15 символів в довжину";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "Ви можете відновити гаманець за допомогою приватних ключів";
|
String get restore_description_from_keys => "Ви можете відновити гаманець за допомогою приватних ключів";
|
||||||
|
@ -3896,6 +3920,8 @@ class $uk extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "OK";
|
String get ok => "OK";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "Ви впевнені, що хочете видалити вибраний контакт?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Monero Гаманець";
|
String get wallet_list_title => "Monero Гаманець";
|
||||||
@override
|
@override
|
||||||
String get authentication => "Аутентифікація";
|
String get authentication => "Аутентифікація";
|
||||||
|
@ -4438,6 +4464,8 @@ class $ja extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "取引履歴";
|
String get trade_history_title => "取引履歴";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "連絡先を削除します";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "ウォレット名には文字のみを含めることができます\n1〜15文字である必要があります";
|
String get error_text_wallet_name => "ウォレット名には文字のみを含めることができます\n1〜15文字である必要があります";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "生成されたウォレットを復元します秘密鍵から保存されたキーストローク";
|
String get restore_description_from_keys => "生成されたウォレットを復元します秘密鍵から保存されたキーストローク";
|
||||||
|
@ -4508,6 +4536,8 @@ class $ja extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "OK";
|
String get ok => "OK";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "選択した連絡先を削除してもよろしいですか?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Monero 財布";
|
String get wallet_list_title => "Monero 財布";
|
||||||
@override
|
@override
|
||||||
String get authentication => "認証";
|
String get authentication => "認証";
|
||||||
|
@ -5054,6 +5084,8 @@ class $pl extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "Historia handlu";
|
String get trade_history_title => "Historia handlu";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "Usuń kontakt";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "Nazwa portfela może zawierać tylko litery i cyfry\ni musi mieć od 1 do 15 znaków";
|
String get error_text_wallet_name => "Nazwa portfela może zawierać tylko litery i cyfry\ni musi mieć od 1 do 15 znaków";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "Przywróć swój portfel z wygenerowanego naciśnięcia klawiszy zapisane z kluczy prywatnych";
|
String get restore_description_from_keys => "Przywróć swój portfel z wygenerowanego naciśnięcia klawiszy zapisane z kluczy prywatnych";
|
||||||
|
@ -5124,6 +5156,8 @@ class $pl extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "Dobrze";
|
String get ok => "Dobrze";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "Czy na pewno chcesz usunąć wybrany kontakt?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Portfel Monero";
|
String get wallet_list_title => "Portfel Monero";
|
||||||
@override
|
@override
|
||||||
String get authentication => "Poświadczenie";
|
String get authentication => "Poświadczenie";
|
||||||
|
@ -5666,6 +5700,8 @@ class $es extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "Historia del comercio";
|
String get trade_history_title => "Historia del comercio";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "Remover contacto";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "El nombre de la billetera solo puede contener letras, números \ny debe tener entre 1 y 15 caracteres de longitud";
|
String get error_text_wallet_name => "El nombre de la billetera solo puede contener letras, números \ny debe tener entre 1 y 15 caracteres de longitud";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "Restaure su billetera de las pulsaciones de teclas generadas guardadas de sus claves privadas";
|
String get restore_description_from_keys => "Restaure su billetera de las pulsaciones de teclas generadas guardadas de sus claves privadas";
|
||||||
|
@ -5736,6 +5772,8 @@ class $es extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "OK";
|
String get ok => "OK";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "¿Estás seguro de que quieres eliminar el contacto seleccionado?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Monedero Monero";
|
String get wallet_list_title => "Monedero Monero";
|
||||||
@override
|
@override
|
||||||
String get authentication => "Autenticación";
|
String get authentication => "Autenticación";
|
||||||
|
@ -6278,6 +6316,8 @@ class $nl extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "Handelsgeschiedenis";
|
String get trade_history_title => "Handelsgeschiedenis";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "Contact verwijderen";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "Naam portemonnee kan alleen letters, cijfers bevatten\nen moet tussen de 1 en 15 tekens lang zijn";
|
String get error_text_wallet_name => "Naam portemonnee kan alleen letters, cijfers bevatten\nen moet tussen de 1 en 15 tekens lang zijn";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "Herstel uw portemonnee van gegenereerd toetsaanslagen opgeslagen van uw privésleutels";
|
String get restore_description_from_keys => "Herstel uw portemonnee van gegenereerd toetsaanslagen opgeslagen van uw privésleutels";
|
||||||
|
@ -6348,6 +6388,8 @@ class $nl extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "OK";
|
String get ok => "OK";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "Weet u zeker dat u het geselecteerde contact wilt verwijderen?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Monero portemonnee";
|
String get wallet_list_title => "Monero portemonnee";
|
||||||
@override
|
@override
|
||||||
String get authentication => "Authenticatie";
|
String get authentication => "Authenticatie";
|
||||||
|
@ -6890,6 +6932,8 @@ class $zh extends S {
|
||||||
@override
|
@override
|
||||||
String get trade_history_title => "交易历史";
|
String get trade_history_title => "交易历史";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_contact => "刪除聯繫人";
|
||||||
|
@override
|
||||||
String get error_text_wallet_name => "钱包名称只能包含字母,数字\n且必须介于1到15个字符之间";
|
String get error_text_wallet_name => "钱包名称只能包含字母,数字\n且必须介于1到15个字符之间";
|
||||||
@override
|
@override
|
||||||
String get restore_description_from_keys => "R从生成的电子钱包从您的私钥中保存的击键";
|
String get restore_description_from_keys => "R从生成的电子钱包从您的私钥中保存的击键";
|
||||||
|
@ -6960,6 +7004,8 @@ class $zh extends S {
|
||||||
@override
|
@override
|
||||||
String get ok => "好";
|
String get ok => "好";
|
||||||
@override
|
@override
|
||||||
|
String get address_remove_content => "您確定要刪除所選的聯繫人嗎?";
|
||||||
|
@override
|
||||||
String get wallet_list_title => "Monero 钱包";
|
String get wallet_list_title => "Monero 钱包";
|
||||||
@override
|
@override
|
||||||
String get authentication => "认证方式";
|
String get authentication => "认证方式";
|
||||||
|
|
|
@ -10,6 +10,7 @@ import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/src/domain/common/crypto_currency.dart';
|
import 'package:cake_wallet/src/domain/common/crypto_currency.dart';
|
||||||
import 'package:cake_wallet/src/stores/address_book/address_book_store.dart';
|
import 'package:cake_wallet/src/stores/address_book/address_book_store.dart';
|
||||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||||
|
|
||||||
class AddressBookPage extends BasePage {
|
class AddressBookPage extends BasePage {
|
||||||
AddressBookPage({this.isEditable = true});
|
AddressBookPage({this.isEditable = true});
|
||||||
|
@ -17,14 +18,11 @@ class AddressBookPage extends BasePage {
|
||||||
final bool isEditable;
|
final bool isEditable;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get isModalBackButton => true;
|
Color get backgroundColor => PaletteDark.historyPanel;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get title => S.current.address_book;
|
String get title => S.current.address_book;
|
||||||
|
|
||||||
@override
|
|
||||||
AppBarStyle get appBarStyle => AppBarStyle.withShadow;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget trailing(BuildContext context) {
|
Widget trailing(BuildContext context) {
|
||||||
if (!isEditable) {
|
if (!isEditable) {
|
||||||
|
@ -34,17 +32,17 @@ class AddressBookPage extends BasePage {
|
||||||
final addressBookStore = Provider.of<AddressBookStore>(context);
|
final addressBookStore = Provider.of<AddressBookStore>(context);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: 28.0,
|
width: 32.0,
|
||||||
height: 28.0,
|
height: 32.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle, color: Theme.of(context).selectedRowColor),
|
shape: BoxShape.circle, color: PaletteDark.menuList),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Icon(Icons.add, color: Palette.violet, size: 22.0),
|
Icon(Icons.add, color: Colors.white, size: 22.0),
|
||||||
ButtonTheme(
|
ButtonTheme(
|
||||||
minWidth: 28.0,
|
minWidth: 32.0,
|
||||||
height: 28.0,
|
height: 32.0,
|
||||||
child: FlatButton(
|
child: FlatButton(
|
||||||
shape: CircleBorder(),
|
shape: CircleBorder(),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
@ -63,20 +61,30 @@ class AddressBookPage extends BasePage {
|
||||||
final addressBookStore = Provider.of<AddressBookStore>(context);
|
final addressBookStore = Provider.of<AddressBookStore>(context);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
|
color: PaletteDark.historyPanel,
|
||||||
padding: EdgeInsets.only(top: 20.0, bottom: 20.0),
|
padding: EdgeInsets.only(top: 20.0, bottom: 20.0),
|
||||||
child: Observer(
|
child: Observer(
|
||||||
builder: (_) => ListView.separated(
|
builder: (_) => ListView.separated(
|
||||||
separatorBuilder: (_, __) => Divider(
|
separatorBuilder: (_, __) => Container(
|
||||||
color: Theme.of(context).dividerTheme.color,
|
height: 1,
|
||||||
height: 1.0,
|
padding: EdgeInsets.only(left: 24),
|
||||||
|
color: PaletteDark.menuList,
|
||||||
|
child: Container(
|
||||||
|
height: 1,
|
||||||
|
color: PaletteDark.mainBackgroundColor,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
itemCount: addressBookStore.contactList == null
|
itemCount: addressBookStore.contactList == null
|
||||||
? 0
|
? 0
|
||||||
: addressBookStore.contactList.length,
|
: addressBookStore.contactList.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
final contact = addressBookStore.contactList[index];
|
final contact = addressBookStore.contactList[index];
|
||||||
|
final image = _getCurrencyImage(contact.type);
|
||||||
|
|
||||||
final content = ListTile(
|
final isDrawTop = index == 0 ? true : false;
|
||||||
|
final isDrawBottom = index == addressBookStore.contactList.length - 1 ? true : false;
|
||||||
|
|
||||||
|
final content = GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (!isEditable) {
|
if (!isEditable) {
|
||||||
Navigator.of(context).pop(contact);
|
Navigator.of(context).pop(contact);
|
||||||
|
@ -86,39 +94,69 @@ class AddressBookPage extends BasePage {
|
||||||
final isCopied = await showNameAndAddressDialog(
|
final isCopied = await showNameAndAddressDialog(
|
||||||
context, contact.name, contact.address);
|
context, contact.name, contact.address);
|
||||||
|
|
||||||
if (isCopied) {
|
if (isCopied != null && isCopied) {
|
||||||
await Clipboard.setData(
|
await Clipboard.setData(
|
||||||
ClipboardData(text: contact.address));
|
ClipboardData(text: contact.address));
|
||||||
Scaffold.of(context).showSnackBar(
|
Scaffold.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text('Copied to Clipboard'),
|
content: Text(
|
||||||
|
S.of(context).copied_to_clipboard,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.green,
|
backgroundColor: Colors.green,
|
||||||
duration: Duration(milliseconds: 1500),
|
duration: Duration(milliseconds: 1500),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
leading: Container(
|
child: Column(
|
||||||
height: 25.0,
|
children: <Widget>[
|
||||||
width: 48.0,
|
isDrawTop
|
||||||
alignment: Alignment.center,
|
? Container(
|
||||||
decoration: BoxDecoration(
|
width: double.infinity,
|
||||||
color: _getCurrencyBackgroundColor(contact.type),
|
height: 1,
|
||||||
borderRadius: BorderRadius.circular(6.0),
|
color: PaletteDark.mainBackgroundColor,
|
||||||
),
|
)
|
||||||
|
: Offstage(),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
color: PaletteDark.menuList,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
image != null
|
||||||
|
? image
|
||||||
|
: Offstage(),
|
||||||
|
Padding(
|
||||||
|
padding: image != null
|
||||||
|
? EdgeInsets.only(left: 12)
|
||||||
|
: EdgeInsets.only(left: 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
contact.type.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 11.0,
|
|
||||||
color: _getCurrencyTextColor(contact.type),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
title: Text(
|
|
||||||
contact.name,
|
contact.name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.0,
|
fontSize: 14,
|
||||||
color: Theme.of(context).primaryTextTheme.title.color),
|
color: Colors.white
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isDrawBottom
|
||||||
|
? Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 1,
|
||||||
|
color: PaletteDark.mainBackgroundColor,
|
||||||
|
)
|
||||||
|
: Offstage(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -130,7 +168,7 @@ class AddressBookPage extends BasePage {
|
||||||
child: content,
|
child: content,
|
||||||
secondaryActions: <Widget>[
|
secondaryActions: <Widget>[
|
||||||
IconSlideAction(
|
IconSlideAction(
|
||||||
caption: 'Edit',
|
caption: S.of(context).edit,
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
icon: Icons.edit,
|
icon: Icons.edit,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
@ -141,7 +179,7 @@ class AddressBookPage extends BasePage {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconSlideAction(
|
IconSlideAction(
|
||||||
caption: 'Delete',
|
caption: S.of(context).delete,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
icon: CupertinoIcons.delete,
|
icon: CupertinoIcons.delete,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
@ -171,95 +209,68 @@ class AddressBookPage extends BasePage {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
Color _getCurrencyBackgroundColor(CryptoCurrency currency) {
|
Image _getCurrencyImage(CryptoCurrency currency) {
|
||||||
Color color;
|
Image image;
|
||||||
switch (currency) {
|
switch (currency) {
|
||||||
case CryptoCurrency.xmr:
|
case CryptoCurrency.xmr:
|
||||||
color = Palette.cakeGreenWithOpacity;
|
image = Image.asset('assets/images/monero.png', height: 24, width: 24);
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.ada:
|
case CryptoCurrency.ada:
|
||||||
color = Colors.blue[200];
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.bch:
|
case CryptoCurrency.bch:
|
||||||
color = Colors.orangeAccent;
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.bnb:
|
case CryptoCurrency.bnb:
|
||||||
color = Colors.blue;
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.btc:
|
case CryptoCurrency.btc:
|
||||||
color = Colors.orange;
|
image = Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.dash:
|
case CryptoCurrency.dash:
|
||||||
color = Colors.blue;
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.eos:
|
case CryptoCurrency.eos:
|
||||||
color = Colors.orangeAccent;
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.eth:
|
case CryptoCurrency.eth:
|
||||||
color = Colors.black;
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.ltc:
|
case CryptoCurrency.ltc:
|
||||||
color = Colors.blue[200];
|
image = Image.asset('assets/images/litecoin.png', height: 24, width: 24);
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.nano:
|
case CryptoCurrency.nano:
|
||||||
color = Colors.orange;
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.trx:
|
case CryptoCurrency.trx:
|
||||||
color = Colors.black;
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.usdt:
|
case CryptoCurrency.usdt:
|
||||||
color = Colors.blue[200];
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.xlm:
|
case CryptoCurrency.xlm:
|
||||||
color = color = Colors.blue;
|
image = null;
|
||||||
break;
|
break;
|
||||||
case CryptoCurrency.xrp:
|
case CryptoCurrency.xrp:
|
||||||
color = Colors.orangeAccent;
|
image = null;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
color = Colors.white;
|
image = null;
|
||||||
}
|
}
|
||||||
return color;
|
return image;
|
||||||
}
|
|
||||||
|
|
||||||
Color _getCurrencyTextColor(CryptoCurrency currency) {
|
|
||||||
Color color;
|
|
||||||
switch (currency) {
|
|
||||||
case CryptoCurrency.xmr:
|
|
||||||
color = Palette.cakeGreen;
|
|
||||||
break;
|
|
||||||
case CryptoCurrency.ltc:
|
|
||||||
case CryptoCurrency.ada:
|
|
||||||
case CryptoCurrency.usdt:
|
|
||||||
color = Palette.lightBlue;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
color = Colors.white;
|
|
||||||
}
|
|
||||||
return color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> showAlertDialog(BuildContext context) async {
|
Future<bool> showAlertDialog(BuildContext context) async {
|
||||||
return await showDialog(
|
return await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertWithTwoActions(
|
||||||
title: const Text(
|
alertTitle: S.of(context).address_remove_contact,
|
||||||
'Remove contact',
|
alertContent: S.of(context).address_remove_content,
|
||||||
textAlign: TextAlign.center,
|
leftButtonText: S.of(context).remove,
|
||||||
),
|
rightButtonText: S.of(context).cancel,
|
||||||
content: const Text(
|
actionLeftButton: () => Navigator.of(context).pop(true),
|
||||||
'Are you sure that you want to remove selected contact?',
|
actionRightButton: () => Navigator.of(context).pop(false)
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
actions: <Widget>[
|
|
||||||
FlatButton(
|
|
||||||
onPressed: () => Navigator.of(context).pop( false),
|
|
||||||
child: const Text('Cancel')),
|
|
||||||
FlatButton(
|
|
||||||
onPressed: () => Navigator.of(context).pop(true),
|
|
||||||
child: const Text('Remove')),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -269,24 +280,13 @@ class AddressBookPage extends BasePage {
|
||||||
return await showDialog(
|
return await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertWithTwoActions(
|
||||||
title: Text(
|
alertTitle: name,
|
||||||
name,
|
alertContent: address,
|
||||||
textAlign: TextAlign.center,
|
leftButtonText: S.of(context).copy,
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
rightButtonText: S.of(context).cancel,
|
||||||
),
|
actionLeftButton: () => Navigator.of(context).pop(true),
|
||||||
content: Text(
|
actionRightButton: () => Navigator.of(context).pop(false)
|
||||||
address,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
actions: <Widget>[
|
|
||||||
FlatButton(
|
|
||||||
onPressed: () => Navigator.of(context).pop(false),
|
|
||||||
child: Text('Cancel')),
|
|
||||||
FlatButton(
|
|
||||||
onPressed: () => Navigator.of(context).pop(true),
|
|
||||||
child: Text('Copy'))
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "Name des Ansprechpartners",
|
"contact_name" : "Name des Ansprechpartners",
|
||||||
"reset" : "Zurücksetzen",
|
"reset" : "Zurücksetzen",
|
||||||
"save" : "speichern",
|
"save" : "speichern",
|
||||||
|
"address_remove_contact" : "Kontakt entfernen",
|
||||||
|
"address_remove_content" : "Sind Sie sicher, dass Sie den ausgewählten Kontakt entfernen möchten?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "Authentifiziert",
|
"authenticated" : "Authentifiziert",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "Contact Name",
|
"contact_name" : "Contact Name",
|
||||||
"reset" : "Reset",
|
"reset" : "Reset",
|
||||||
"save" : "Save",
|
"save" : "Save",
|
||||||
|
"address_remove_contact" : "Remove contact",
|
||||||
|
"address_remove_content" : "Are you sure that you want to remove selected contact?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "Authenticated",
|
"authenticated" : "Authenticated",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "Nombre de contacto",
|
"contact_name" : "Nombre de contacto",
|
||||||
"reset" : "Reiniciar",
|
"reset" : "Reiniciar",
|
||||||
"save" : "Salvar",
|
"save" : "Salvar",
|
||||||
|
"address_remove_contact" : "Remover contacto",
|
||||||
|
"address_remove_content" : "¿Estás seguro de que quieres eliminar el contacto seleccionado?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "Autenticados",
|
"authenticated" : "Autenticados",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "संपर्क नाम",
|
"contact_name" : "संपर्क नाम",
|
||||||
"reset" : "रीसेट",
|
"reset" : "रीसेट",
|
||||||
"save" : "बचाना",
|
"save" : "बचाना",
|
||||||
|
"address_remove_contact" : "संपर्क हटाये",
|
||||||
|
"address_remove_content" : "क्या आप वाकई चयनित संपर्क को हटाना चाहते हैं?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "प्रमाणीकृत",
|
"authenticated" : "प्रमाणीकृत",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "連絡先",
|
"contact_name" : "連絡先",
|
||||||
"reset" : "リセットする",
|
"reset" : "リセットする",
|
||||||
"save" : "セーブ",
|
"save" : "セーブ",
|
||||||
|
"address_remove_contact" : "連絡先を削除します",
|
||||||
|
"address_remove_content" : "選択した連絡先を削除してもよろしいですか?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "認証済み",
|
"authenticated" : "認証済み",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "담당자 이름",
|
"contact_name" : "담당자 이름",
|
||||||
"reset" : "다시 놓기",
|
"reset" : "다시 놓기",
|
||||||
"save" : "구하다",
|
"save" : "구하다",
|
||||||
|
"address_remove_contact" : "연락처 삭제",
|
||||||
|
"address_remove_content" : "선택한 연락처를 삭제 하시겠습니까?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "인증",
|
"authenticated" : "인증",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "Contactnaam",
|
"contact_name" : "Contactnaam",
|
||||||
"reset" : "Reset",
|
"reset" : "Reset",
|
||||||
"save" : "Opslaan",
|
"save" : "Opslaan",
|
||||||
|
"address_remove_contact" : "Contact verwijderen",
|
||||||
|
"address_remove_content" : "Weet u zeker dat u het geselecteerde contact wilt verwijderen?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "Authenticated",
|
"authenticated" : "Authenticated",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "Nazwa Kontaktu",
|
"contact_name" : "Nazwa Kontaktu",
|
||||||
"reset" : "Nastawić",
|
"reset" : "Nastawić",
|
||||||
"save" : "Zapisać",
|
"save" : "Zapisać",
|
||||||
|
"address_remove_contact" : "Usuń kontakt",
|
||||||
|
"address_remove_content" : "Czy na pewno chcesz usunąć wybrany kontakt?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "Zalegalizowany",
|
"authenticated" : "Zalegalizowany",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "Nome do contato",
|
"contact_name" : "Nome do contato",
|
||||||
"reset" : "Limpar",
|
"reset" : "Limpar",
|
||||||
"save" : "Salvar",
|
"save" : "Salvar",
|
||||||
|
"address_remove_contact" : "Remover contato",
|
||||||
|
"address_remove_content" : "Tem certeza de que deseja remover o contato selecionado?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "Autenticado",
|
"authenticated" : "Autenticado",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "Имя контакта",
|
"contact_name" : "Имя контакта",
|
||||||
"reset" : "Сброс",
|
"reset" : "Сброс",
|
||||||
"save" : "Сохранить",
|
"save" : "Сохранить",
|
||||||
|
"address_remove_contact" : "Удалить контакт",
|
||||||
|
"address_remove_content" : "Вы уверены, что хотите удалить выбранный контакт?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "Аутентифицировано",
|
"authenticated" : "Аутентифицировано",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "Ім'я контакту",
|
"contact_name" : "Ім'я контакту",
|
||||||
"reset" : "Скинути",
|
"reset" : "Скинути",
|
||||||
"save" : "Зберегти",
|
"save" : "Зберегти",
|
||||||
|
"address_remove_contact" : "Видалити контакт",
|
||||||
|
"address_remove_content" : "Ви впевнені, що хочете видалити вибраний контакт?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "Аутентифіковано",
|
"authenticated" : "Аутентифіковано",
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"contact_name" : "联系人姓名",
|
"contact_name" : "联系人姓名",
|
||||||
"reset" : "重启",
|
"reset" : "重启",
|
||||||
"save" : "保存",
|
"save" : "保存",
|
||||||
|
"address_remove_contact" : "刪除聯繫人",
|
||||||
|
"address_remove_content" : "您確定要刪除所選的聯繫人嗎?",
|
||||||
|
|
||||||
|
|
||||||
"authenticated" : "已认证",
|
"authenticated" : "已认证",
|
||||||
|
|
Loading…
Reference in a new issue