Skip to content

Commit

Permalink
add new function
Browse files Browse the repository at this point in the history
  • Loading branch information
amazingCoding committed Apr 27, 2023
1 parent 60b26af commit b92e98b
Show file tree
Hide file tree
Showing 30 changed files with 368 additions and 269 deletions.
Binary file added images/2.0x/logo_b_40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2.0x/qr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/3.0x/logo_b_40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/3.0x/qr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/logo_b_40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/qr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions lib/common/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class DarkColors {
static const bottomNavColor = Color(0xCCA0A3BD);
static const transactionColor = Color(0x4DA0A3BD);
static const greenColor = Color(0xFF168A3C);
// 20% opacity
static const greenColorMask = Color(0x66168A3C);

static const redColor = Color(0xFFDD4556);
// gold
static const yellowColor = Color(0xFFE8B000);
Expand Down
4 changes: 2 additions & 2 deletions lib/common/global.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ class Global {
static String buildNumber = '';

static const String rpcURL = 'https://testnet-rpc.xdagj.org';
static const String explorURL = 'https://testexplorer.xdag.io/api';
static const String explorURL = 'https://testexplorer.xdag.io';

static const String mainRpcURL = 'https://mainnet-rpc.xdagj.org';
static const String mainExplorURL = 'https://mainnet-explorer.xdagj.org/api';
static const String mainExplorURL = 'https://mainnet-explorer.xdagj.org';

static const bool isTest = false;

Expand Down
10 changes: 8 additions & 2 deletions lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@
"contact_tips":"Bitte beachten Sie, dass Kontakte nur lokal auf diesem Gerät gespeichert werden. Wenn Sie die App löschen, gehen Ihre Kontakte dauerhaft verloren und können nicht wiederhergestellt werden.",
"no_contacts":"Keine Kontakte",
"tips":"Tipps",
"wallet_tips":"Wischen Sie den Eintrag nach rechts, um das Wallet zu löschen",
"wallet_tips":"Wischen Sie das Element nach links, um die Brieftasche zu löschen.",
"hide_balance":"Guthaben ausblenden",
"contact_address_repeat": "Kontaktadresse existiert bereits",
"no_wallets":"Keine Wallet"
"no_wallets":"Keine Wallet",
"view_in_explorer":"Im Explorer anzeigen",
"details":"Details",
"sent":"Gesendet",
"received":"Empfangen",
"qr_code":"QR-code",
"save_to_album":"In Album speichern"
}
10 changes: 8 additions & 2 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@
"contact_tips":"Please note that contacts are only stored locally on this device. If you delete the app, your contacts will be permanently lost and cannot be recovered.",
"no_contacts":"Any contact",
"tips":"Tips",
"wallet_tips":"Swipe the item to the right to delete the wallet.",
"wallet_tips":"Swipe the item to the left to delete the wallet.",
"hide_balance":"Hide Balance",
"contact_address_repeat":"Contact address already exists",
"no_wallets":"Any wallet"
"no_wallets":"Any wallet",
"view_in_explorer":"View in explorer",
"details":"Details",
"sent":"Sent",
"received":"Received",
"qr_code":"QR Code",
"save_to_album":"Save to album"
}
10 changes: 8 additions & 2 deletions lib/l10n/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@
"contact_tips": "Ten en cuenta que los contactos se almacenan solo localmente en este dispositivo. Si eliminas la aplicación, tus contactos se perderán permanentemente y no se podrán recuperar.",
"no_contacts": "Cualquier contacto",
"tips": "Consejos",
"wallet_tips": "Desliza el elemento hacia la derecha para eliminar la billetera.",
"wallet_tips":"Desliza el elemento hacia la izquierda para eliminar la billetera.",
"hide_balance": "Ocultar saldo",
"contact_address_repeat": "La dirección del contacto ya existe",
"no_wallets": "Cualquier cartera"
"no_wallets": "Cualquier cartera",
"view_in_explorer": "Ver en el explorador",
"details": "Detalles",
"sent": "Enviado",
"received": "Recibido",
"qr_code": "Código QR",
"save_to_album": "Guardar en el álbum"
}
18 changes: 12 additions & 6 deletions lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
"enter_password": "Entrez le code secret",
"use_biometrics_tips_1": "Appuyez pour utiliser Face ID",
"use_biometrics_tips_2": "Appuyez pour utiliser Touch ID",
"use_biometrics_tips_3": "Appuyez pour utiliser les biométriques",
"use_biometrics_tips_3": "Appuyez pour utiliser contrôle biométrique",
"use_password": "Utiliser le code secret",
"use_biometrics_1": "Utiliser Face ID",
"use_biometrics_2": "Utiliser Touch ID",
"use_biometrics_3": "Utiliser les biométriques",
"use_biometrics_3": "Utiliser contrôle biométrique",
"delete_tip": "Si vous supprimez votre portefeuille sans le sauvegarder, vous perdrez tous vos actifs numériques de manière permanente et ils ne pourront pas être récupérés.",
"write_Down_Mnemonics": "Noter les mnémoniques",
"write_Down_PrivateKey": "Noter la clé privée",
Expand All @@ -63,10 +63,10 @@
"change_password_success": "Code secret changé avec succès",
"enable_biometrics_1": "Activer Face ID",
"enable_biometrics_2": "Activer Touch ID",
"enable_biometrics_3": "Activer les biométriques",
"enable_biometrics_3": "Activer contrôle biométrique",
"disenable_biometrics_1": "Désactiver Face ID",
"disenable_biometrics_2": "Désactiver Touch ID",
"disenable_biometrics_3": "Désactiver les biométriques",
"disenable_biometrics_3": "Désactiver contrôle biométrique",
"no_transactions": "Aucune transaction",
"send_on": "Envoyé le",
"receive_on": "Reçu le",
Expand Down Expand Up @@ -120,8 +120,14 @@
"contact_tips":"Veuillez noter que les contacts sont uniquement stockés localement sur cet appareil. Si vous supprimez l'application, vos contacts seront définitivement perdus et ne pourront pas être récupérés.",
"no_contacts":"Aucun contact",
"tips":"Conseils",
"wallet_tips":"Balayez l'élément vers la droite pour supprimer le portefeuille.",
"wallet_tips":"Balayez l'élément vers la gauche pour supprimer le portefeuille.",
"hide_balance":"Masquer le solde",
"contact_address_repeat": "L'adresse de contact existe déjà",
"no_wallets": "Aucun portefeuille"
"no_wallets": "Aucun portefeuille",
"view_in_explorer": "Voir dans l'explorateur",
"details": "Détails",
"sent": "Envoyé",
"received": "Reçu",
"qr_code": "Code QR",
"save_to_album": "Enregistrer dans l'album"
}
10 changes: 8 additions & 2 deletions lib/l10n/app_it.arb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@
"contact_tips": "Si prega di notare che i contatti sono conservati solo localmente su questo dispositivo. Se si elimina l'app, i contatti verranno persi in modo permanente e non saranno recuperabili.",
"no_contacts": "Nessun contatto",
"tips": "Suggerimenti",
"wallet_tips": "Scorri l'elemento verso destra per eliminare il portafoglio",
"wallet_tips": "Scorri l'elemento a sinistra per eliminare il portafoglio.",
"hide_balance": "Nascondi saldo",
"contact_address_repeat": "L'indirizzo del contatto è già stato aggiunto",
"no_wallets": "Nessun portafoglio"
"no_wallets": "Nessun portafoglio",
"view_in_explorer": "Visualizza in Explorer",
"details":"dettagli",
"sent":"Inviato",
"received":"Ricevuto",
"qr_code":"Codice QR",
"save_to_album":"Salva in album"
}
10 changes: 8 additions & 2 deletions lib/l10n/app_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@
"contact_tips":"連絡先はこのデバイスにのみ保存されます。アプリを削除すると、連絡先は永久に失われ、回復できません。",
"no_contacts":"連絡先がありません",
"tips":"ヒント",
"wallet_tips":"ウォレットを削除するには、アイテムを右にスワイプしてください。",
"wallet_tips":"財布を削除するには、アイテムを左にスワイプしてください。",
"hide_balance":"残高を非表示",
"contact_address_repeat": "連絡先がすでに存在しています",
"no_wallets":"ウォレットがありません"
"no_wallets":"ウォレットがありません",
"view_in_explorer":"エクスプローラーで表示",
"details":"詳細",
"sent":"送信",
"received":"受け取る",
"qr_code":"QRコード",
"save_to_album":"アルバムに保存"
}
10 changes: 8 additions & 2 deletions lib/l10n/app_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@
"contact_tips":"Обратите внимание, что контакты хранятся только локально на этом устройстве. Если вы удалите приложение, ваши контакты будут навсегда потеряны и не могут быть восстановлены.",
"no_contacts":"Нет контактов",
"tips":"Советы",
"wallet_tips":"Чтобы удалить кошелек, проведите элемент вправо.",
"wallet_tips":"Чтобы удалить кошелек, проведите элемент влево.",
"hide_balance":"Скрыть баланс",
"contact_address_repeat": "Контактный адрес уже существует",
"no_wallets":"Нет кошельков"
"no_wallets":"Нет кошельков",
"view_in_explorer":"Посмотреть в исследователе",
"details":"Детали",
"sent":"Отправлено",
"received":"Получено",
"qr_code":"QR-код",
"save_to_album":"Сохранить в альбом"
}
10 changes: 8 additions & 2 deletions lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@
"contact_tips":"请注意,联系人仅存储在本地设备上。如果您删除应用程序,您的联系人将永久丢失,无法找回。",
"no_contacts":"没有联系人",
"tips":"提示",
"wallet_tips":"向右滑动该项以删除钱包。",
"wallet_tips":"向左滑动该项以删除钱包。",
"hide_balance":"隐藏余额",
"contact_address_repeat": "联系地址已存在",
"no_wallets":"没有钱包"
"no_wallets":"没有钱包",
"view_in_explorer":"在浏览器中查看",
"details":"详情",
"sent":"发送",
"received":"接收",
"qr_code":"二维码",
"save_to_album":"保存到相册"
}
9 changes: 5 additions & 4 deletions lib/model/config_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class ConfigModal extends ChangeNotifier {
LangItem('Français', const Locale('fr', 'FR')),
LangItem('Русский', const Locale('ru', 'RU')),
LangItem('Deutsch', const Locale('de', 'DE')),
LangItem('Spanish', const Locale('es', 'ES')),
LangItem('Italy', const Locale('it', 'IT')),
LangItem('Español', const Locale('es', 'ES')),
LangItem('Italiano', const Locale('it', 'IT')),
];
static final List<String> netWorks = ["MainNet", "TestNet"];

Expand All @@ -37,8 +37,9 @@ class ConfigModal extends ChangeNotifier {
return walletConfig.network == 0 ? Global.mainRpcURL : Global.rpcURL;
}

String getCurrentExplorer() {
return walletConfig.network == 0 ? Global.mainExplorURL : Global.explorURL;
String getCurrentExplorer({isApi = true}) {
var url = walletConfig.network == 0 ? Global.mainExplorURL : Global.explorURL;
return isApi ? '$url/api' : url;
}

changeNetwork(int pos) async {
Expand Down
9 changes: 8 additions & 1 deletion lib/page/common/check_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ class _CheckPageState extends State<CheckPage> {
Widget build(BuildContext context) {
ConfigModal config = Provider.of<ConfigModal>(context);
String tipsText = type == 0 ? AppLocalizations.of(context).use_biometrics_tips_1 : AppLocalizations.of(context).use_biometrics_tips_2;
String btnTex = type == 0 ? AppLocalizations.of(context).use_biometrics_1 : AppLocalizations.of(context).use_biometrics_2;
if (type > 0 && Platform.isAndroid) {
tipsText = AppLocalizations.of(context).use_biometrics_tips_3;
}
if (Platform.isAndroid) {
btnTex = AppLocalizations.of(context).use_biometrics_3;
}
var padding = Helper.isDesktop ? 10.0 : ScreenHelper.topPadding;
return Scaffold(
backgroundColor: DarkColors.bgColor,
Expand Down Expand Up @@ -95,12 +99,15 @@ class _CheckPageState extends State<CheckPage> {
setState(() {
type = type == -1 ? Global.devBiometricsType : -1;
});
if (type != -1) {
check();
}
},
child: Container(
height: 40,
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Center(
child: Text(AppLocalizations.of(context).use_password, style: Helper.fitChineseFont(context, const TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Colors.white))),
child: Text(type == -1 ? btnTex : AppLocalizations.of(context).use_password, style: Helper.fitChineseFont(context, const TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Colors.white))),
),
),
)
Expand Down
2 changes: 1 addition & 1 deletion lib/page/common/langs_select.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class NetWorkSelectPage extends StatelessWidget {
ConfigModal config = Provider.of<ConfigModal>(context);
double bottomPadding = ScreenHelper.bottomPadding;
List<String> netWorks = ConfigModal.netWorks;
double height = 60 + (bottomPadding > 0 ? bottomPadding : 20) + 70 * netWorks.length + 10;
double height = 60 + (bottomPadding > 0 ? bottomPadding : 20) + 70 * netWorks.length + 10 + 30;
return ModalFrame(
height: height,
title: AppLocalizations.of(context).select_network,
Expand Down
3 changes: 3 additions & 0 deletions lib/page/common/webview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class _WebViewPageState extends State<WebViewPage> {
onPageStarted: (String url) {},
onPageFinished: (String url) {},
onWebResourceError: (WebResourceError error) {},
onNavigationRequest: (NavigationRequest request) {
return NavigationDecision.navigate;
},
),
);

Expand Down
Loading

0 comments on commit b92e98b

Please sign in to comment.