diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 63675b4..020f713 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -384,18 +384,16 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = 8LQTZ965C8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = XDAG; + INFOPLIST_KEY_CFBundleDisplayName = "XDAG-Pro"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.business"; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = com.xdag.io; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -521,18 +519,16 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = 8LQTZ965C8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = XDAG; + INFOPLIST_KEY_CFBundleDisplayName = "XDAG-Pro"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.business"; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = com.xdag.io; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -548,18 +544,16 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = 8LQTZ965C8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = XDAG; + INFOPLIST_KEY_CFBundleDisplayName = "XDAG-Pro"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.business"; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = com.xdag.io; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/legals/privacy_policy.html b/legals/privacy_policy.html index d182f87..c46e12c 100644 --- a/legals/privacy_policy.html +++ b/legals/privacy_policy.html @@ -7,21 +7,21 @@ -

XDAG App Privacy Policy

-

When you use our XDAG application, we take your privacy and security very seriously. This Privacy Policy is +

XDAG-Pro App Privacy Policy

+

When you use our XDAG-Pro application, we take your privacy and security very seriously. This Privacy Policy is designed to explain when and how we collect, use, protect, and disclose your personal information.

1. Information Collection

-

We only collect necessary information to provide the services and features of the XDAG application. We may collect +

We only collect necessary information to provide the services and features of the XDAG-Pro application. We may collect the following information:

2. Information Use

-

We only use the collected information to provide the services and features of the XDAG application, such as:

+

We only use the collected information to provide the services and features of the XDAG-Pro application, such as:

5. Third-Party Services

-

Our XDAG application may link to third-party services or websites. We cannot control the privacy policies or +

Our XDAG-Pro application may link to third-party services or websites. We cannot control the privacy policies or security measures of these third-party services or websites. Therefore, we recommend that you review the privacy policies of these third-party services or websites.

6. Changes to Privacy Policy

We may update this Privacy Policy from time to time. If we make any material changes, we will notify you through - the XDAG application or other appropriate means. Please check this Privacy Policy regularly for updates.

+ the XDAG-Pro application or other appropriate means. Please check this Privacy Policy regularly for updates.

7. Contact Us

If you have any questions or comments about our Privacy Policy, please contact us. Our contact information is as follows:

diff --git a/legals/terms_of_use.html b/legals/terms_of_use.html index 37c6978..b71ad23 100644 --- a/legals/terms_of_use.html +++ b/legals/terms_of_use.html @@ -3,46 +3,46 @@ - XDAG Terms of Use + XDAG-Pro Terms of Use -

XDAG Terms of Use

+

XDAG-Pro Terms of Use

1. Service Description

-

The XDAG application is a digital wallet application designed to allow users to manage and store digital currencies +

The XDAG-Pro application is a digital wallet application designed to allow users to manage and store digital currencies more conveniently.

2. User Registration

-

Before using the XDAG application, you need to register and create an account. You must provide accurate, true, +

Before using the XDAG-Pro application, you need to register and create an account. You must provide accurate, true, up-to-date, and complete personal information and update it promptly if it changes. If the information you provide - is untrue, inaccurate, incomplete, or out-of-date, XDAG may suspend or terminate your account and refuse your access - to all or part of the XDAG application.

+ is untrue, inaccurate, incomplete, or out-of-date, XDAG-Pro may suspend or terminate your account and refuse your access + to all or part of the XDAG-Pro application.

3. User Behavior

-

You must comply with local laws and regulations and the rules of the XDAG application. You may not engage in any - illegal, fraudulent, false, obscene, defamatory, infringing, or other harmful behavior using the XDAG application. +

You must comply with local laws and regulations and the rules of the XDAG-Pro application. You may not engage in any + illegal, fraudulent, false, obscene, defamatory, infringing, or other harmful behavior using the XDAG-Pro application.

4. Privacy Protection

-

XDAG is committed to protecting your personal privacy. We will take appropriate measures to protect your personal +

XDAG-Pro is committed to protecting your personal privacy. We will take appropriate measures to protect your personal information from unauthorized access, use, or disclosure. Please read our privacy policy to understand how we collect, use, and protect your personal information.

5. Fees and Payment

-

The XDAG application may require payment for its services. Before using paid services, you need to understand the +

The XDAG-Pro application may require payment for its services. Before using paid services, you need to understand the relevant fees and payment methods. You are responsible for paying all applicable fees and paying them on time. If - you fail to pay the fees on time, XDAG may suspend or terminate your account.

+ you fail to pay the fees on time, XDAG-Pro may suspend or terminate your account.

6. Service Changes and Interruptions

-

XDAG may modify, suspend, or terminate part or all of the XDAG application's features. We will try our best to +

XDAG-Pro may modify, suspend, or terminate part or all of the XDAG-Pro application's features. We will try our best to notify you in advance of any modifications, suspensions, or terminations, but we are not liable to you or any third party for any such actions.

7. Disclaimer of Liability

-

The XDAG application's services are provided on an "as is" and "as available" basis. We do not guarantee that the - XDAG application's services will meet your needs, be secure, reliable, timely, accurate, complete, or uninterrupted. - We are not responsible for any losses or damages resulting from your use of the XDAG application.

+

The XDAG-Pro application's services are provided on an "as is" and "as available" basis. We do not guarantee that the + XDAG-Pro application's services will meet your needs, be secure, reliable, timely, accurate, complete, or uninterrupted. + We are not responsible for any losses or damages resulting from your use of the XDAG-Pro application.

8. Intellectual Property

-

The XDAG application contains information and content protected by intellectual property laws, including but not - limited to text, images, graphics, photos, audio, video, codes, software, user interface design, and XDAG - trademarks. Without explicit authorization from XDAG, any use or reproduction of such information and content is +

The XDAG-Pro application contains information and content protected by intellectual property laws, including but not + limited to text, images, graphics, photos, audio, video, codes, software, user interface design, and XDAG-Pro + trademarks. Without explicit authorization from XDAG-Pro, any use or reproduction of such information and content is prohibited.

If you have any questions or concerns regarding these terms of use, please contact us at communitymanager@xdag.io.

+ href="mailto:communitymanager@XDAG-Pro.io">communitymanager@XDAG-Pro.io.

\ No newline at end of file diff --git a/lib/common/global.dart b/lib/common/global.dart index 66ead83..ca209ad 100644 --- a/lib/common/global.dart +++ b/lib/common/global.dart @@ -17,6 +17,7 @@ class WalletConfig { String walletAddress; bool hasReadLegal; int network = 1; + bool lockApp = true; WalletConfig({this.local = 0, this.hasSetPassword = false, this.hasSetBiometrics = false, this.walletAddress = "", this.hasReadLegal = false}); } @@ -25,7 +26,7 @@ class Global { static late WalletConfig walletConfig; static late Box walletListBox; static late List contactsListBox; - static late int devBiometricsType; + static int devBiometricsType = -1; static late SharedPreferences _prefs; static late FlutterSecureStorage _storage; @@ -103,6 +104,7 @@ class Global { static checkPassword(String password) async { String? savedPassword = await _storage.read(key: _passwordKey); + print("savedPassword: $savedPassword and password: $password"); return savedPassword == password; } @@ -167,7 +169,7 @@ class Global { if (res != null) { throw Exception("address exist"); } - Wallet wallet = Wallet(name, "0.00", address, true, !needBackUp); + Wallet wallet = Wallet(name, "0.00", address, true, !needBackUp, false); await _storage.write(key: address, value: data); await walletListBox.add(wallet); return wallet; diff --git a/lib/common/helper.dart b/lib/common/helper.dart index e11e51e..6785725 100644 --- a/lib/common/helper.dart +++ b/lib/common/helper.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -57,6 +56,18 @@ class Helper { return "${date.year}-${date.month < 10 ? "0${date.month}" : date.month}-${date.day < 10 ? "0${date.day}" : date.day} ${date.hour < 10 ? "0${date.hour}" : date.hour}:${date.minute < 10 ? "0${date.minute}" : date.minute}"; } + static String formatDouble(String num) { + String result; + double number = double.parse(num); + if (number == number.toInt()) { + result = "${number.toInt()}.00"; + } else { + // 向下保留两位小数 + result = number.toStringAsFixed(2); + } + return result; + } + // show toast static void showToast(BuildContext context, String msg) { ScaffoldMessenger.of(context).removeCurrentSnackBar(); diff --git a/lib/common/transaction.dart b/lib/common/transaction.dart index f7b5efe..17af046 100644 --- a/lib/common/transaction.dart +++ b/lib/common/transaction.dart @@ -130,7 +130,6 @@ class TransactionHelper { } return true; } catch (e) { - print(e); return false; } } diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index b2da0d0..d492ab2 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -16,7 +16,7 @@ "repeat_password": "Passwort wiederholen", "security": "Sicherheit", "walletName": "Wallet-Name", - "createWalletTips": "Ich verstehe, dass das XDAG Wallet mein Passwort nicht wiederherstellen kann", + "createWalletTips": "Ich verstehe, dass XDAG-Pro mein Passwort nicht wiederherstellen kann。", "continueText": "Fortfahren", "mnemonic": "Mnemonic", "privateKey": "Privater Schlüssel", @@ -75,8 +75,8 @@ "fee":"Gebühr", "cancel": "Abbrechen", "verify_protect_wallet": "Bitte verifizieren Sie, um Ihre Brieftasche zu schützen", - "review_Privacy_Policy": "Bitte lesen Sie die Nutzungsbedingungen und Datenschutzbestimmungen der XDAG Wallet.", - "accepted_Privacy_Policy": "Ich habe die Nutzungsbedingungen und Datenschutzbestimmungen gelesen und akzeptiert.", + "review_Privacy_Policy": "Bitte überprüfen Sie die Datenschutzrichtlinien und Nutzungsbedingungen von XDAG-Pro.", + "accepted_Privacy_Policy":"Ich habe die Datenschutzrichtlinien und Nutzungsbedingungen gelesen und akzeptiert.", "snapshot": "Snapshot", "walletAddress": "Wallet-Adresse", "to": "An", @@ -99,7 +99,7 @@ "confirm_Mnemonic":"Mnemonic bestätigen", "successful":"Erfolgreich", "backup_test_tips_4":"Sie haben den Wallet-Schutztest bestanden. Bitte denken Sie daran, dass Helferwörter gespeichert werden müssen.", - "backup_test_tips_5":"Wenn Sie sie verlieren, kann die XDAG-Brieftasche Ihre Brieftasche nicht wiederherstellen.", + "backup_test_tips_5":"Wenn Sie es verlieren, kann XDAG-Pro Ihre Brieftasche nicht wiederherstellen.", "secure_wallet":"Schützen Sie Ihre Geldbörse", "start":"Starten", "next":"Weiter", @@ -118,5 +118,8 @@ "delete_contact":"Bestätigen Sie das Löschen der Kontakte?", "contact_name_error":"Kontaktname unterstützt nur Buchstaben, Zahlen und Leerzeichen", "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" + "no_contacts":"Keine Kontakte", + "tips":"Tipps", + "wallet_tips":"Wischen Sie den Eintrag nach rechts, um das Wallet zu löschen。", + "hide_balance":"Guthaben ausblenden" } \ No newline at end of file diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index cc2e39d..5cd7951 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -16,21 +16,21 @@ "repeat_password": "Repeat Password", "security": "Security", "walletName": "Wallet Name", - "createWalletTips": "I understand that the XDAG wallet can't recover my password", + "createWalletTips": "I understand that XDAG-Pro can't recover my password", "continueText": "Continue", "mnemonic": "Mnemonic", "privateKey":"Private Key", "skip_for_now": "Skip for now", - "create_biometrics_tips_1": "Click to enable Face ID", - "create_biometrics_tips_2": "Click to enable Touch ID", - "create_biometrics_tips_3": "Click to enable Biometrics", + "create_biometrics_tips_1": "Press here enable Face ID", + "create_biometrics_tips_2": "Press here enable Touch ID", + "create_biometrics_tips_3": "Press here enable Biometrics", "attention": "Attention", "reset_password_tips": "Although you have created a password in the previous operation, you can reset it at any time before importing or creating a wallet.", "reset_password": "Reset Password", "language": "Language", "legal_documents": "Legal documents", "about_us": "About us", - "setting": "Setting", + "setting": "Settings", "wallet": "Wallet", "privacy_Policy": "Privacy Policy", "terms_of_Use": "Terms of Use", @@ -46,9 +46,9 @@ "backup":"Backup", "delete_wallet":"Delete Wallet", "enter_password":"Enter password", - "use_biometrics_tips_1": "Click to use Face ID", - "use_biometrics_tips_2": "Click to use Touch ID", - "use_biometrics_tips_3": "Click to use Biometrics", + "use_biometrics_tips_1": "Press here use Face ID", + "use_biometrics_tips_2": "Press here use Touch ID", + "use_biometrics_tips_3": "Press here use Biometrics", "use_password": "Use password", "use_biometrics_1": "Use Face ID", "use_biometrics_2": "Use Touch ID", @@ -67,7 +67,7 @@ "disenable_biometrics_1": "Disenable Face ID", "disenable_biometrics_2": "Disenable Touch ID", "disenable_biometrics_3": "Disenable Biometrics", - "no_transactions":"No transactions", + "no_transactions":"Any transaction", "send_on":"Send on", "receive_on":"Receive on", "receiver":"Receiver", @@ -75,8 +75,8 @@ "fee":"Fee", "cancel":"Cancel", "verify_protect_wallet":"Please verify to protect your wallet", - "review_Privacy_Policy":"Please review the XDAG Wallet Terms of Service and Privacy Policy.", - "accepted_Privacy_Policy":"I have read and accepted the Terms of Service and Privacy Policy.", + "review_Privacy_Policy":"Please review XDAG-Pro Privacy Policy and Terms of Service.", + "accepted_Privacy_Policy":"I have read and accepted the Privacy Policy and Terms of Service.", "snapshot":"Snapshot", "walletAddress":"Wallet address", "to":"To", @@ -99,7 +99,7 @@ "confirm_Mnemonic":"Confirm Mnemonic", "successful":"Successful", "backup_test_tips_4":"You have passed the wallet protection test, please remember that helper words must be saved.", - "backup_test_tips_5":"If you lose it, the XDAG wallet cannot recover your wallet.", + "backup_test_tips_5":"If you lose it, XDAG-Pro cannot recover your wallet.", "secure_wallet":"Secure Your Wallet", "start":"Start", "next":"Next", @@ -118,5 +118,8 @@ "delete_contact":"Do you confirm to delete contacts?", "contact_name_error":"Contact name only supports letters, numbers, and spaces", "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":"No contacts" + "no_contacts":"Any contact", + "tips":"Tips", + "wallet_tips":"Swipe the item to the right to delete the wallet.", + "hide_balance":"Hide Balance" } \ No newline at end of file diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index c308d00..c5c5486 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -16,7 +16,7 @@ "repeat_password": "Répéter le mot de passe", "security": "Sécurité", "walletName": "Nom du portefeuille", - "createWalletTips": "Je comprends que le portefeuille XDAG ne peut pas récupérer mon mot de passe", + "createWalletTips": "Je comprends que XDAG-Pro ne peut pas récupérer mon mot de passe。", "continueText": "Continuer", "mnemonic": "Mnémonique", "privateKey":"Clé privée", @@ -75,8 +75,8 @@ "fee": "Frais", "cancel": "Annuler", "verify_protect_wallet": "Veuillez vérifier pour protéger votre portefeuille", - "review_Privacy_Policy": "Veuillez examiner les conditions d'utilisation et la politique de confidentialité du portefeuille XDAG.", - "accepted_Privacy_Policy": "J'ai lu et accepté les conditions d'utilisation et la politique de confidentialité.", + "review_Privacy_Policy": "Veuillez consulter la politique de confidentialité et les conditions d'utilisation de XDAG-Pro.", + "accepted_Privacy_Policy": "J'ai lu et accepté la politique de confidentialité et les conditions d'utilisation.", "snapshot": "Instantané", "walletAddress": "Adresse du portefeuille", "to": "À", @@ -99,7 +99,7 @@ "confirm_Mnemonic":"Confirmer le Mnemonic", "successful":"Succès", "backup_test_tips_4":"Vous avez réussi le test de protection du portefeuille. Veuillez noter que les mots d'aide doivent être enregistrés.", - "backup_test_tips_5":"Si vous le perdez, le portefeuille XDAG ne peut pas récupérer votre portefeuille.", + "backup_test_tips_5":"Si vous le perdez, XDAG-Pro ne pourra pas récupérer votre portefeuille.", "secure_wallet":"Protégez votre portefeuille", "start":"Démarrer", "next":"Suivant", @@ -118,5 +118,8 @@ "delete_contact":"Confirmez-vous la suppression des contacts ?", "contact_name_error":"Le nom de contact ne prend en charge que les lettres, les chiffres et les espaces", "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":"Pas de contacts" + "no_contacts":"Aucun contact", + "tips":"Conseils", + "wallet_tips":"Balayez l'élément vers la droite pour supprimer le portefeuille.", + "hide_balance":"Masquer le solde" } \ No newline at end of file diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index 085280d..cd25744 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -16,7 +16,7 @@ "repeat_password": "パスワードを繰り返す", "security": "セキュリティ", "walletName": "ウォレット名", - "createWalletTips": "XDAGウォレットはパスワードを回復できないことを理解しています", + "createWalletTips": "XDAG-Pro は私のパスワードを回復できないことを理解しています。", "continueText": "続行", "mnemonic": "ニーモニック", "privateKey":"プライベートキー", @@ -75,8 +75,8 @@ "fee":"手数料", "cancel":"キャンセル", "verify_protect_wallet":"ウォレットを保護するために確認してください", - "review_Privacy_Policy": "XDAGウォレットの利用規約とプライバシーポリシーをご確認ください。", - "accepted_Privacy_Policy": "利用規約とプライバシーポリシーを読み、同意します。", + "review_Privacy_Policy": "XDAG-Proのプライバシーポリシーと利用規約を確認してください。", + "accepted_Privacy_Policy":"プライバシーポリシーと利用規約を読んで同意します。", "snapshot": "スナップショット", "walletAddress": "ウォレットアドレス", "to": "宛先", @@ -99,7 +99,7 @@ "confirm_Mnemonic":"ニーモニックの確認", "successful":"成功しました。", "backup_test_tips_4":"ウォレット保護テストに合格しました。ヘルパーワードを保存する必要があることを覚えておいてください。", - "backup_test_tips_5":"紛失した場合、XDAGウォレットではウォレットを回復できません。", + "backup_test_tips_5":"シードフレーズを紛失した場合、XDAG-Proはあなたのウォレットを復旧できません。", "secure_wallet":"あなたのウォレットを安全に保ちます", "start":"開始", "next":"次へ", @@ -118,5 +118,8 @@ "delete_contact":"連絡先を削除しますか?", "contact_name_error":"連絡先名は、英数字とスペースのみがサポートされています", "contact_tips":"連絡先はこのデバイスにのみ保存されます。アプリを削除すると、連絡先は永久に失われ、回復できません。", - "no_contacts":"連絡先がありません" + "no_contacts":"連絡先がありません", + "tips":"ヒント", + "wallet_tips":"ウォレットを削除するには、アイテムを右にスワイプしてください。", + "hide_balance":"残高を非表示" } \ No newline at end of file diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index 3ad0da7..7e4a472 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -16,7 +16,7 @@ "repeat_password": "Повторите пароль", "security": "Безопасность", "walletName": "Название кошелька", - "createWalletTips": "Я понимаю, что кошелек XDAG не может восстановить мой пароль", + "createWalletTips": "Я понимаю, что XDAG-Pro не может восстановить мой пароль.", "continueText": "Продолжить", "mnemonic": "Мнемоническая фраза", "privateKey":"Приватный ключ", @@ -75,8 +75,8 @@ "fee":"Комиссия", "cancel":"Отмена", "verify_protect_wallet":"Пожалуйста, подтвердите, чтобы защитить свой кошелек", - "review_Privacy_Policy":"Пожалуйста, ознакомьтесь с Условиями использования и Политикой конфиденциальности кошелька XDAG.", - "accepted_Privacy_Policy":"Я прочитал(а) и принимаю Условия использования и Политику конфиденциальности.", + "review_Privacy_Policy":"Пожалуйста, ознакомьтесь с Политикой конфиденциальности и Условиями использования XDAG-Pro.", + "accepted_Privacy_Policy":"Я прочитал и принимаю Политику конфиденциальности и Условия использования.", "snapshot":"Снимок", "walletAddress":"Адрес кошелька", "to":"Кому", @@ -99,7 +99,7 @@ "confirm_Mnemonic":"Подтвердить мнемоник", "successful":"Успешно", "backup_test_tips_4":"Вы прошли тест защиты кошелька. Пожалуйста, помните, что помощники должны быть сохранены.", - "backup_test_tips_5":"Если вы потеряете их, кошелек XDAG не сможет восстановить ваш кошелек.", + "backup_test_tips_5":"Если вы его потеряете, XDAG-Pro не сможет восстановить ваш кошелек.", "secure_wallet":"Защитите свой кошелек", "start":"Начать", "next":"Далее", @@ -118,5 +118,8 @@ "delete_contact":"Вы подтверждаете удаление контактов?", "contact_name_error":"Имя контакта поддерживает только буквы, цифры и пробелы", "contact_tips":"Обратите внимание, что контакты хранятся только локально на этом устройстве. Если вы удалите приложение, ваши контакты будут навсегда потеряны и не могут быть восстановлены.", - "no_contacts":"Нет контактов" + "no_contacts":"Нет контактов", + "tips":"Советы", + "wallet_tips":"Чтобы удалить кошелек, проведите элемент вправо.", + "hide_balance":"Скрыть баланс" } \ No newline at end of file diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 3753671..d591a71 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -16,7 +16,7 @@ "repeat_password": "重复密码", "security": "安全", "walletName": "钱包名称", - "createWalletTips": "我明白 XDAG 钱包无法恢复我的密码", + "createWalletTips": "我了解 XDAG-Pro 无法恢复我的密码。", "continueText": "继续", "mnemonic": "助记词", "privateKey": "私钥", @@ -75,8 +75,8 @@ "fee":"费用", "cancel":"取消", "verify_protect_wallet": "请验证以保护您的钱包", - "review_Privacy_Policy": "请查看 XDAG 钱包的服务条款和隐私政策。", - "accepted_Privacy_Policy": "我已阅读并接受服务条款和隐私政策。", + "review_Privacy_Policy":"请查阅 XDAG-Pro 的隐私政策和服务条款。", + "accepted_Privacy_Policy": "我已阅读并接受隐私政策和服务条款。", "snapshot": "快照", "walletAddress": "钱包地址", "to": "到", @@ -99,7 +99,7 @@ "confirm_Mnemonic":"确认助记词", "successful":"成功", "backup_test_tips_4":"您已通过钱包保护测试,请记住需要保存助手词。", - "backup_test_tips_5":"如果您丢失它,XDAG钱包将无法恢复您的钱包。", + "backup_test_tips_5":"如果您丢失了助记词,XDAG-Pro将无法恢复您的钱包。", "secure_wallet":"保护你的钱包安全", "start":"开始", "next":"下一步", @@ -118,5 +118,8 @@ "delete_contact":"确认删除联系人吗?", "contact_name_error":"联系人名称仅支持字母、数字和空格", "contact_tips":"请注意,联系人仅存储在本地设备上。如果您删除应用程序,您的联系人将永久丢失,无法找回。", - "no_contacts":"没有联系人" + "no_contacts":"没有联系人", + "tips":"提示", + "wallet_tips":"向右滑动该项以删除钱包。", + "hide_balance":"隐藏余额" } \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 8c4c889..56d0d26 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -15,7 +15,6 @@ import 'package:xdag/page/common/change_name_page.dart'; import 'package:xdag/page/common/face_id_page.dart'; import 'package:xdag/page/common/legal_page.dart'; import 'package:xdag/page/common/password_page.dart'; -import 'package:xdag/page/common/secure_wallet_page.dart'; import 'package:xdag/page/common/security_page.dart'; import 'package:xdag/page/common/create_wallet_page.dart'; import 'package:xdag/page/common/webview.dart'; @@ -72,6 +71,7 @@ class MyWidget extends StatelessWidget { fontFamily: "RobotoMono", pageTransitionsTheme: const PageTransitionsTheme( builders: { + TargetPlatform.macOS: CupertinoPageTransitionsBuilder(), TargetPlatform.android: CupertinoPageTransitionsBuilder(), TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), }, @@ -82,7 +82,7 @@ class MyWidget extends StatelessWidget { "/create": (context) => const CreateWalletPage(), "/faceid": (context) => const FaceIDPage(), "/select": (context) => const WalletListPage(), - "/security_wallet": (context) => const SecureWalletPage(), + // "/security_wallet": (context) => const SecureWalletPage(), "/wallet": (context) => const WalletHomePage(), "/security": (context) => const SecurityPage(), "/legal": (context) => const LegalPage(), diff --git a/lib/model/db_model.dart b/lib/model/db_model.dart index e1e4e37..eaf6150 100644 --- a/lib/model/db_model.dart +++ b/lib/model/db_model.dart @@ -18,7 +18,10 @@ class Wallet extends HiveObject { @HiveField(4) bool isBackup; - Wallet(this.name, this.amount, this.address, this.isDef, this.isBackup); + @HiveField(5) + bool? hideBalance; + + Wallet(this.name, this.amount, this.address, this.isDef, this.isBackup, this.hideBalance); } // @HiveType(typeId: 2) diff --git a/lib/model/db_model.g.dart b/lib/model/db_model.g.dart index dd52a43..1a5e133 100644 --- a/lib/model/db_model.g.dart +++ b/lib/model/db_model.g.dart @@ -22,13 +22,14 @@ class WalletAdapter extends TypeAdapter { fields[2] as String, fields[3] as bool, fields[4] as bool, + fields[5] as bool?, ); } @override void write(BinaryWriter writer, Wallet obj) { writer - ..writeByte(5) + ..writeByte(6) ..writeByte(0) ..write(obj.name) ..writeByte(1) @@ -38,7 +39,9 @@ class WalletAdapter extends TypeAdapter { ..writeByte(3) ..write(obj.isDef) ..writeByte(4) - ..write(obj.isBackup); + ..write(obj.isBackup) + ..writeByte(5) + ..write(obj.hideBalance); } @override diff --git a/lib/model/wallet_modal.dart b/lib/model/wallet_modal.dart index 9ae608e..de69b42 100644 --- a/lib/model/wallet_modal.dart +++ b/lib/model/wallet_modal.dart @@ -35,7 +35,7 @@ class WalletModal extends ChangeNotifier { } Wallet getWallet() { - return defaultWallet ?? Wallet('', '', '', true, true); + return defaultWallet ?? Wallet('', '', '', true, true, false); } createWallet({required String name, required String address, required String data, bool needBackUp = false}) async { @@ -104,4 +104,13 @@ class WalletModal extends ChangeNotifier { notifyListeners(); } } + + setShowBalance(bool? flag) async { + Wallet? wallet = defaultWallet; + if (wallet != null) { + wallet.hideBalance = flag; + await wallet.save(); + notifyListeners(); + } + } } diff --git a/lib/page/common/add_contacts_page.dart b/lib/page/common/add_contacts_page.dart index c2b07f9..0968ca7 100644 --- a/lib/page/common/add_contacts_page.dart +++ b/lib/page/common/add_contacts_page.dart @@ -66,7 +66,7 @@ class _AddContactsPage extends State { height: 40, child: CupertinoButton( padding: EdgeInsets.zero, - color: DarkColors.blockColor, + color: DarkColors.mainColor, borderRadius: BorderRadius.circular(20), onPressed: () async { setState(() { diff --git a/lib/page/common/back_up_test_page.dart b/lib/page/common/back_up_test_page.dart index 6fa4bc9..23d1969 100644 --- a/lib/page/common/back_up_test_page.dart +++ b/lib/page/common/back_up_test_page.dart @@ -180,7 +180,7 @@ class _BackUpTestPageState extends State { onPressed: () => Navigator.pop(context), ), Expanded( - child: Padding( + child: SingleChildScrollView( padding: const EdgeInsets.fromLTRB(15, 30, 15, 0), child: Column( children: [ diff --git a/lib/page/common/check_page.dart b/lib/page/common/check_page.dart index 9025d50..c3cddaf 100644 --- a/lib/page/common/check_page.dart +++ b/lib/page/common/check_page.dart @@ -13,7 +13,8 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class CheckPage extends StatefulWidget { final void Function(bool) checkCallback; final bool onlyPassword; - const CheckPage({super.key, required this.checkCallback, this.onlyPassword = false}); + final bool canClose; + const CheckPage({super.key, required this.checkCallback, this.onlyPassword = false, this.canClose = true}); @override State createState() => _CheckPageState(); } @@ -53,75 +54,86 @@ class _CheckPageState extends State { // print(Global.devBiometricsType != -1 && !widget.onlyPassword); return Scaffold( backgroundColor: DarkColors.bgColor, - body: Column( - children: [ - Container( - padding: EdgeInsets.only(top: ScreenHelper.topPadding), - height: 50 + ScreenHelper.topPadding, - child: Row( - children: [ - const SizedBox(width: 15), - SizedBox( - width: 40, - height: 40, - child: CupertinoButton( - padding: EdgeInsets.zero, - color: DarkColors.blockColor, - borderRadius: BorderRadius.circular(20), - onPressed: () { - Navigator.of(context).pop(false); - widget.checkCallback(false); - }, - child: const Icon(Icons.close, color: Colors.white, size: 16), - ), - ), - const Spacer(), - (Global.devBiometricsType != -1 && !widget.onlyPassword) && config.walletConfig.hasSetBiometrics - ? CupertinoButton( + body: WillPopScope( + onWillPop: () async { + return widget.canClose; + }, + child: Column( + children: [ + Container( + padding: EdgeInsets.only(top: ScreenHelper.topPadding), + height: 50 + ScreenHelper.topPadding, + child: Row( + children: [ + const SizedBox(width: 15), + if (widget.canClose) + SizedBox( + width: 40, + height: 40, + child: CupertinoButton( padding: EdgeInsets.zero, color: DarkColors.blockColor, borderRadius: BorderRadius.circular(20), onPressed: () { - setState(() { - type = type == -1 ? Global.devBiometricsType : -1; - }); + Navigator.of(context).pop(false); + widget.checkCallback(false); }, - child: Container( - height: 40, - padding: const EdgeInsets.symmetric(horizontal: 20), - child: Center( - child: Text(AppLocalizations.of(context).use_password, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Colors.white)), + child: const Icon(Icons.close, color: Colors.white, size: 16), + ), + ) + else + const SizedBox( + width: 40, + height: 40, + ), + const Spacer(), + (Global.devBiometricsType != -1 && !widget.onlyPassword) && config.walletConfig.hasSetBiometrics + ? CupertinoButton( + padding: EdgeInsets.zero, + color: DarkColors.blockColor, + borderRadius: BorderRadius.circular(20), + onPressed: () { + setState(() { + type = type == -1 ? Global.devBiometricsType : -1; + }); + }, + child: Container( + height: 40, + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Center( + child: Text(AppLocalizations.of(context).use_password, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Colors.white)), + ), ), - ), - ) - : Container(), - const SizedBox(width: 15), - ], + ) + : Container(), + const SizedBox(width: 15), + ], + ), ), - ), - Expanded( - child: type == -1 - ? InputPassCode( - code: '', - nextPage: 1, - checkCallback: () { - Navigator.of(context).pop(true); - widget.checkCallback(true); - }, - ) - : CupertinoButton( - onPressed: check, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (type == 0) Image.asset('images/face_id.png') else Image.asset('images/biometrics.png'), - const SizedBox(height: 30), - Text(tipsText, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Colors.white)), - ], + Expanded( + child: type == -1 + ? InputPassCode( + code: '', + nextPage: 1, + checkCallback: () { + Navigator.of(context).pop(true); + widget.checkCallback(true); + }, + ) + : CupertinoButton( + onPressed: check, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (type == 0) Image.asset('images/face_id.png') else Image.asset('images/biometrics.png'), + const SizedBox(height: 30), + Text(tipsText, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Colors.white)), + ], + ), ), - ), - ) - ], + ) + ], + ), ), ); } diff --git a/lib/page/common/create_wallet_page.dart b/lib/page/common/create_wallet_page.dart index 550cf22..c0ebb5f 100644 --- a/lib/page/common/create_wallet_page.dart +++ b/lib/page/common/create_wallet_page.dart @@ -424,6 +424,7 @@ class HeaderItem extends StatelessWidget { child: Center( child: Text( title, + textAlign: TextAlign.center, style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.white), ), ), diff --git a/lib/page/common/langs_select.dart b/lib/page/common/langs_select.dart index b1fb458..c457a53 100644 --- a/lib/page/common/langs_select.dart +++ b/lib/page/common/langs_select.dart @@ -15,9 +15,9 @@ class LangsSelectPage extends StatelessWidget { double screenHeight = ScreenHelper.screenHeight; double bottomPadding = ScreenHelper.bottomPadding; ConfigModal config = Provider.of(context); - double height = 60 + (bottomPadding > 0 ? bottomPadding : 20) + 70 * ConfigModal.langs.length + 10; + // double height = 60 + (bottomPadding > 0 ? bottomPadding : 20) + 70 * ConfigModal.langs.length + 10; return ModalFrame( - height: height > screenHeight * 0.8 ? screenHeight * 0.8 : height, + height: screenHeight * 0.8, title: AppLocalizations.of(context).select_language, child: Column( children: [ @@ -69,14 +69,12 @@ class NetWorkSelectPage extends StatelessWidget { @override Widget build(BuildContext context) { - double screenHeight = ScreenHelper.screenHeight; + // double screenHeight = ScreenHelper.screenHeight; double bottomPadding = ScreenHelper.bottomPadding; - // ConfigModal config = Provider.of(context); - //List netWorks = ConfigModal.netWorks; List netWorks = ["TestNet"]; double height = 60 + (bottomPadding > 0 ? bottomPadding : 20) + 70 * netWorks.length + 10; return ModalFrame( - height: height > screenHeight * 0.8 ? screenHeight * 0.8 : height, + height: height, title: AppLocalizations.of(context).select_network, child: Column( children: [ diff --git a/lib/page/common/legal_page.dart b/lib/page/common/legal_page.dart index f5c21ec..ef53a40 100644 --- a/lib/page/common/legal_page.dart +++ b/lib/page/common/legal_page.dart @@ -1,5 +1,8 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher_string.dart'; import 'package:xdag/common/color.dart'; import 'package:xdag/common/helper.dart'; import 'package:xdag/model/config_modal.dart'; @@ -59,7 +62,12 @@ class LegalPage extends StatelessWidget { LabelButton( label: AppLocalizations.of(context).privacy_Policy, onPressed: () { - Navigator.pushNamed(context, '/webview', arguments: WebViewPageRouteParams(url: "https://htmlpreview.github.io/?https://github.com/XDagger/XDAG-Pro/blob/main/legals/privacy_policy.html", title: AppLocalizations.of(context).privacy_Policy)); + var url = "https://htmlpreview.github.io/?https://github.com/XDagger/XDAG-Pro/blob/main/legals/privacy_policy.html"; + if (Platform.isAndroid || Platform.isIOS) { + Navigator.pushNamed(context, '/webview', arguments: WebViewPageRouteParams(url: url, title: AppLocalizations.of(context).privacy_Policy)); + } else { + launchUrlString(url, mode: LaunchMode.externalApplication); + } }, ), const SizedBox(height: 1), @@ -67,7 +75,12 @@ class LegalPage extends StatelessWidget { type: 1, label: AppLocalizations.of(context).terms_of_Use, onPressed: () { - Navigator.pushNamed(context, '/webview', arguments: WebViewPageRouteParams(url: "https://htmlpreview.github.io/?https://github.com/XDagger/XDAG-Pro/blob/main/legals/terms_of_use.html", title: AppLocalizations.of(context).terms_of_Use)); + var url = "https://htmlpreview.github.io/?https://github.com/XDagger/XDAG-Pro/blob/main/legals/terms_of_use.html"; + if (Platform.isAndroid || Platform.isIOS) { + Navigator.pushNamed(context, '/webview', arguments: WebViewPageRouteParams(url: url, title: AppLocalizations.of(context).privacy_Policy)); + } else { + launchUrlString(url, mode: LaunchMode.externalApplication); + } }, ), const Spacer(), diff --git a/lib/page/common/password_page.dart b/lib/page/common/password_page.dart index 4799d76..f8a2a4a 100644 --- a/lib/page/common/password_page.dart +++ b/lib/page/common/password_page.dart @@ -95,7 +95,7 @@ class _PasswordPageState extends State { if (Global.devBiometricsType != -1) LabelButton( type: 1, - padding: const EdgeInsets.fromLTRB(15, 0, 10, 0), + padding: const EdgeInsets.fromLTRB(15, 10, 10, 10), label: title, child: CupertinoSwitch( activeColor: DarkColors.mainColor54, @@ -103,31 +103,27 @@ class _PasswordPageState extends State { thumbColor: isSwitched ? DarkColors.mainColor : Colors.white, value: isSwitched, onChanged: (bool? value) { + bool oldValue = isSwitched; bool newValue = !isSwitched; setState(() { isSwitched = newValue; }); - // check password - if (newValue) { - showModalBottomSheet( - backgroundColor: DarkColors.bgColor, - context: context, - isScrollControlled: true, - builder: (BuildContext buildContext) => CheckPage( - onlyPassword: true, - checkCallback: (bool isCheck) async { - if (isCheck) { - config.saveBiometrics(true); - } else { - setState(() { - isSwitched = false; - }); - } - }), - ); - } else { - config.saveBiometrics(false); - } + showModalBottomSheet( + backgroundColor: DarkColors.bgColor, + context: context, + isScrollControlled: true, + builder: (BuildContext buildContext) => CheckPage( + onlyPassword: true, + checkCallback: (bool isCheck) async { + if (isCheck) { + config.saveBiometrics(newValue); + } else { + setState(() { + isSwitched = oldValue; + }); + } + }), + ); }, ), ) diff --git a/lib/page/detail/contacts_page.dart b/lib/page/detail/contacts_page.dart index 0db7d57..7d9c5b4 100644 --- a/lib/page/detail/contacts_page.dart +++ b/lib/page/detail/contacts_page.dart @@ -55,7 +55,7 @@ class ContactsStatePage extends State { height: 40, child: CupertinoButton( padding: EdgeInsets.zero, - color: DarkColors.blockColor, + color: DarkColors.mainColor, borderRadius: BorderRadius.circular(20), onPressed: () async { setState(() { diff --git a/lib/page/detail/send_page.dart b/lib/page/detail/send_page.dart index 6621963..c3217da 100644 --- a/lib/page/detail/send_page.dart +++ b/lib/page/detail/send_page.dart @@ -281,7 +281,7 @@ class _SendPageState extends State { minFontSize: 16, maxLines: 10, minLines: 1, - maxLength: 33, + maxLength: 32, autofocus: false, keyboardAppearance: Brightness.dark, contextMenuBuilder: (context, editableTextState) { diff --git a/lib/page/detail/wallet_detail.dart b/lib/page/detail/wallet_detail.dart index cf7cf7e..148ac31 100644 --- a/lib/page/detail/wallet_detail.dart +++ b/lib/page/detail/wallet_detail.dart @@ -71,31 +71,48 @@ class WalletDetailPage extends StatelessWidget { ), const SizedBox(height: 1), LabelButton( - type: 1, - onPressed: () async { - Helper.changeAndroidStatusBar(false); - await showModalBottomSheet( - backgroundColor: DarkColors.bgColor, - context: context, - isScrollControlled: true, - builder: (BuildContext buildContext) => CheckPage(checkCallback: (bool isCheck) async { - if (isCheck) { - String? data = await Global.getWalletDataByAddress(wallet.address); - if (data != null && context.mounted) { - Helper.changeAndroidStatusBar(false); - if (data.contains(" ")) { - await Navigator.pushNamed(context, "/back_up", arguments: BackUpPageRouteParams(data, 0)); - } else { - await Navigator.pushNamed(context, "/back_up", arguments: BackUpPageRouteParams(data, 1)); - } - Helper.changeAndroidStatusBar(true); + type: 2, + padding: const EdgeInsets.fromLTRB(15, 10, 10, 10), + onPressed: () async {}, + label: AppLocalizations.of(context).hide_balance, + child: CupertinoSwitch( + activeColor: DarkColors.mainColor54, + trackColor: DarkColors.transactionColor, + thumbColor: wallet.hideBalance == true ? DarkColors.mainColor : Colors.white, + value: wallet.hideBalance == true, + onChanged: (bool? value) { + walletModal.setShowBalance(value!); + }, + ), + ), + const SizedBox(height: 1), + LabelButton( + type: 1, + onPressed: () async { + Helper.changeAndroidStatusBar(false); + await showModalBottomSheet( + backgroundColor: DarkColors.bgColor, + context: context, + isScrollControlled: true, + builder: (BuildContext buildContext) => CheckPage(checkCallback: (bool isCheck) async { + if (isCheck) { + String? data = await Global.getWalletDataByAddress(wallet.address); + if (data != null && context.mounted) { + Helper.changeAndroidStatusBar(false); + if (data.contains(" ")) { + await Navigator.pushNamed(context, "/back_up", arguments: BackUpPageRouteParams(data, 0)); + } else { + await Navigator.pushNamed(context, "/back_up", arguments: BackUpPageRouteParams(data, 1)); } + Helper.changeAndroidStatusBar(true); } - }), - ); - Helper.changeAndroidStatusBar(true); - }, - label: AppLocalizations.of(context).backup), + } + }), + ); + Helper.changeAndroidStatusBar(true); + }, + label: AppLocalizations.of(context).backup, + ), ], ), )); diff --git a/lib/page/detail/wallet_list_page.dart b/lib/page/detail/wallet_list_page.dart index 14bfd76..411f834 100644 --- a/lib/page/detail/wallet_list_page.dart +++ b/lib/page/detail/wallet_list_page.dart @@ -83,7 +83,84 @@ class _WalletListPageState extends State { backgroundColor: DarkColors.bgColor, body: Column( children: [ - NavHeader(title: AppLocalizations.of(context).select_Wallet), + NavHeader( + title: AppLocalizations.of(context).select_Wallet, + rightWidget: Row( + children: [ + SizedBox( + width: 40, + height: 40, + child: CupertinoButton( + padding: EdgeInsets.zero, + color: Colors.transparent, + borderRadius: BorderRadius.circular(20), + onPressed: () async { + Helper.changeAndroidStatusBarAndNavBar(true); + await showCupertinoModalPopup( + context: context, + barrierColor: Colors.black.withOpacity(0.6), + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: DarkColors.bgColor, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)), + titlePadding: const EdgeInsets.fromLTRB(12.0, 15.0, 12, 0), + insetPadding: const EdgeInsets.fromLTRB(15.0, 25.0, 15.0, 0.0), + contentPadding: const EdgeInsets.fromLTRB(15.0, 25.0, 15.0, 0.0), + actionsPadding: const EdgeInsets.fromLTRB(15.0, 25.0, 15.0, 20.0), + title: Row( + children: [ + CupertinoButton( + padding: EdgeInsets.zero, + child: Container( + width: 40, + height: 40, + decoration: BoxDecoration(color: DarkColors.blockColor, borderRadius: BorderRadius.circular(20.0)), + child: const Icon(Icons.close, color: Colors.white, size: 24), + ), + onPressed: () => Navigator.of(context).pop(), + ), + Expanded( + flex: 1, + child: Center( + child: Text( + AppLocalizations.of(context).tips, + style: const TextStyle(color: Colors.white, fontFamily: 'RobotoMono', fontSize: 20.0, fontWeight: FontWeight.w700), + ), + )), + const SizedBox(width: 40) + ], + ), + content: Text( + AppLocalizations.of(context).wallet_tips, + style: const TextStyle(color: Colors.white, fontFamily: 'RobotoMono', fontSize: 16.0, fontWeight: FontWeight.w500), + ), + actions: [ + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Button( + text: AppLocalizations.of(context).continueText, + bgColor: DarkColors.mainColor, + onPressed: () { + Navigator.of(context).pop(); + }, + ) + ], + ) + ], + ); + }, + ); + Helper.changeAndroidStatusBarAndNavBar(false); + }, + child: const Icon(Icons.info_outline, color: Colors.white, size: 30), + ), + ), + const SizedBox(width: 15), + ], + ), + ), Expanded( child: ListView.builder( padding: const EdgeInsets.only(top: 20), diff --git a/lib/page/start_page.dart b/lib/page/start_page.dart index c34e2ce..7fd1a5a 100644 --- a/lib/page/start_page.dart +++ b/lib/page/start_page.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:xdag/common/color.dart'; import 'package:xdag/common/helper.dart'; import 'package:xdag/model/db_model.dart'; import 'package:xdag/model/wallet_modal.dart'; +import 'package:xdag/page/common/check_page.dart'; import 'package:xdag/page/home_page.dart'; import 'package:xdag/page/wallet/main_page.dart'; @@ -13,11 +15,54 @@ class StartPage extends StatefulWidget { } class _StartPageState extends State { + int needCheck = -1; // 0: no check, 1: to check, 2: check ok + @override + void initState() { + super.initState(); + + WidgetsBinding.instance.addPostFrameCallback((_) { + WalletModal walletModal = Provider.of(context, listen: false); + Wallet? wallet = walletModal.defaultWallet; + var flag = wallet == null; + setState(() { + needCheck = flag ? 0 : 1; + }); + if (!flag) { + showModalBottomSheet( + backgroundColor: DarkColors.bgColor, + context: context, + isScrollControlled: true, + isDismissible: false, + enableDrag: false, + builder: (BuildContext buildContext) => CheckPage( + canClose: false, + checkCallback: (bool isCheck) async { + if (isCheck) { + setState(() { + needCheck = 2; + }); + } + }), + ); + } + }); + } + @override Widget build(BuildContext context) { ScreenHelper.initScreen(context); WalletModal walletModal = Provider.of(context); Wallet? wallet = walletModal.defaultWallet; - return wallet == null ? const HomePage() : const WalletHomePage(); + if (needCheck == -1 || needCheck == 1) { + return const Scaffold( + backgroundColor: DarkColors.bgColor, + body: null, + ); + } + if (wallet == null) { + return const HomePage(); + } else { + return const WalletHomePage(); + } } } diff --git a/lib/page/wallet/wallet_page.dart b/lib/page/wallet/wallet_page.dart index 55972db..fb0ab90 100644 --- a/lib/page/wallet/wallet_page.dart +++ b/lib/page/wallet/wallet_page.dart @@ -21,7 +21,7 @@ class WalletPage extends StatefulWidget { class _WalletPageState extends State { final _refreshIndicatorKey = GlobalKey(); String _crurrentAddress = ""; - String lastTime = ""; + // String lastTime = ""; List list = []; final dio = Dio(); CancelToken cancelToken = CancelToken(); @@ -63,6 +63,7 @@ class _WalletPageState extends State { WalletModal walletModal = Provider.of(context, listen: false); Wallet wallet = walletModal.getWallet(); try { + // DateTime startTime = DateTime.now(); Response responseBalance = await dio.post(Global.rpcURL, cancelToken: cancelToken, data: { "jsonrpc": "2.0", "method": "xdag_getBalance", @@ -70,17 +71,15 @@ class _WalletPageState extends State { "id": 1 }); walletModal.setBlance(responseBalance.data['result']); - // print("${Global.explorURL}/block/${wallet.address}?addresses_page=$currentPage&addresses_per_page=200"); Response response = await dio.get( "${Global.explorURL}/block/${wallet.address}?addresses_page=$currentPage&addresses_per_page=200", cancelToken: cancelToken, ); + // DateTime endTime = DateTime.now(); + // print("request Time:${endTime.difference(startTime).inMilliseconds}ms"); if (response.data["addresses_pagination"] != null) { totalPage = response.data["addresses_pagination"]["last_page"]; } - // if (response.data["balance"] != null) { - // walletModal.setBlance(response.data["balance"]); - // } if (response.data["block_as_address"] != null) { List newList = []; for (var i = 0; i < response.data["block_as_address"].length; i++) { @@ -100,24 +99,25 @@ class _WalletPageState extends State { fee: 0, remark: item["remark"] ?? "", )); - } catch (e) { - // print(e); + } catch (e) {} + } + List allList = currentPage == 1 ? newList : list + newList; + allList.where((element) => element.type != 2).toList(); + List newList2 = []; + newList2.addAll(allList); + String lastTime = ""; + for (var i = 0; i < allList.length - 1; i++) { + var transaction = allList[i]; + if (lastTime == "" || lastTime.substring(0, 7) != transaction.time.substring(0, 7)) { + lastTime = transaction.time; + newList2.insert(i, Transaction(type: 2, time: transaction.time, amount: '', address: '', status: "", from: '', to: '', hash: '', blockAddress: '', fee: 0, remark: "")); } } - // delay 1s - // await Future.delayed(const Duration(seconds: 1)); if (mounted) { - if (currentPage == 1) { - setState(() { - list = newList; - loading = false; - }); - } else { - setState(() { - list.addAll(newList); - loading = false; - }); - } + setState(() { + list = newList2; + loading = false; + }); } } } catch (e) { @@ -210,6 +210,7 @@ class _WalletPageState extends State { const SizedBox(height: 50), const Icon(Icons.crop_landscape, size: 100, color: Colors.white), Text(AppLocalizations.of(context).no_transactions, style: const TextStyle(color: Colors.white, fontSize: 16)), + const SizedBox(height: 50), ]); } if (loading) { @@ -232,25 +233,10 @@ class _WalletPageState extends State { } int pos = index - 1; Transaction transaction = list[pos]; - // print("transaction.type = ${transaction.type} and index = $index"); - Widget box = Container(); - if (pos == 0) { - lastTime = transaction.time; - box = WalletTransactionDateHeader(time: transaction.time); - } else { - if (lastTime.substring(0, 7) != transaction.time.substring(0, 7)) { - lastTime = transaction.time; - box = WalletTransactionDateHeader(time: transaction.time); - } + if (transaction.type == 2) { + return WalletTransactionDateHeader(time: transaction.time); } - return Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - box, - WalletTransactionItem(transaction: transaction, address: wallet.address), - ], - ); + return WalletTransactionItem(transaction: transaction, address: wallet.address); }, ), ), diff --git a/lib/widget/button.dart b/lib/widget/button.dart index df138de..49abfa5 100644 --- a/lib/widget/button.dart +++ b/lib/widget/button.dart @@ -42,6 +42,7 @@ class Button extends StatelessWidget { ) : Text( text, + textAlign: TextAlign.center, style: TextStyle( color: textColor, fontSize: 16.0, diff --git a/lib/widget/home_button.dart b/lib/widget/home_button.dart index 9525083..485d4d0 100644 --- a/lib/widget/home_button.dart +++ b/lib/widget/home_button.dart @@ -21,21 +21,25 @@ class HomeHeaderButton extends StatelessWidget { ), child: Padding( padding: const EdgeInsets.fromLTRB(10, 10, 10, 8), - child: Column(children: [ - Row( - children: [ - Image.asset(icon, width: 20, height: 20), - const Spacer(), - ], - ), - const Spacer(), - Row( - children: [ - const Spacer(), - Text(title, style: const TextStyle(fontSize: 12, fontFamily: 'RobotoMono', fontWeight: FontWeight.w500, color: Colors.white)), - ], - ) - ]), + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Row( + children: [ + Image.asset(icon, width: 20, height: 20), + const Spacer(), + ], + ), + const Spacer(), + Text( + title, + overflow: TextOverflow.ellipsis, + maxLines: 1, + textAlign: TextAlign.end, + style: const TextStyle(fontSize: 12, fontFamily: 'RobotoMono', fontWeight: FontWeight.w500, color: Colors.white), + ), + ], + ), ), )); } diff --git a/lib/widget/home_transaction_item.dart b/lib/widget/home_transaction_item.dart index a56272b..6fbb44e 100644 --- a/lib/widget/home_transaction_item.dart +++ b/lib/widget/home_transaction_item.dart @@ -31,11 +31,12 @@ class WalletTransactionItem extends StatelessWidget { Widget build(BuildContext context) { bool isSend = transaction.from == address; bool isSnapshot = transaction.type == 1; + var amount = Helper.formatDouble(transaction.amount); return CupertinoButton( padding: EdgeInsets.zero, child: Container( - height: 60, - padding: EdgeInsets.zero, + // height: 60, + padding: const EdgeInsets.fromLTRB(0, 10, 0, 10), margin: const EdgeInsets.fromLTRB(15, 10, 15, 0), decoration: BoxDecoration( color: DarkColors.blockColor, @@ -61,7 +62,6 @@ class WalletTransactionItem extends StatelessWidget { const SizedBox(width: 10), Expanded( child: SizedBox( - height: 40, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -72,7 +72,10 @@ class WalletTransactionItem extends StatelessWidget { ), ), ), - Text(isSnapshot ? '${transaction.amount} XDAG' : (isSend ? '-${transaction.amount} XDAG' : '+${transaction.amount} XDAG'), style: TextStyle(decoration: TextDecoration.none, fontSize: 14, fontFamily: 'RobotoMono', fontWeight: FontWeight.w700, color: isSnapshot ? Colors.white54 : (isSend ? DarkColors.bottomNavColor : DarkColors.greenColor))), + const SizedBox(width: 10), + Expanded( + child: Text(isSnapshot ? '$amount XDAG' : (isSend ? '-$amount XDAG' : '+$amount XDAG'), textAlign: TextAlign.end, style: TextStyle(decoration: TextDecoration.none, fontSize: 14, fontFamily: 'RobotoMono', fontWeight: FontWeight.w700, color: isSnapshot ? Colors.white54 : (isSend ? DarkColors.bottomNavColor : DarkColors.greenColor))), + ), const SizedBox(width: 10), ], ), diff --git a/lib/widget/label_button.dart b/lib/widget/label_button.dart index b41bd1a..2c8b1d6 100644 --- a/lib/widget/label_button.dart +++ b/lib/widget/label_button.dart @@ -16,7 +16,7 @@ class LabelButton extends StatelessWidget { required this.label, this.child, this.textClolor = Colors.white, - this.padding = const EdgeInsets.fromLTRB(15, 0, 15, 0), + this.padding = const EdgeInsets.fromLTRB(15, 10, 15, 10), }); @override @@ -43,20 +43,22 @@ class LabelButton extends StatelessWidget { ); Widget? item = child ?? const Icon(Icons.arrow_forward_ios, color: Colors.white, size: 16); return SizedBox( - height: 55, + // height: 55, child: CupertinoButton( - padding: padding, - color: DarkColors.blockColor, - disabledColor: DarkColors.blockColor, - borderRadius: borderRadius, - onPressed: onPressed, - child: Row( - children: [ - Text(label, style: labelStyle), - const Spacer(), - item, - ], + padding: padding, + color: DarkColors.blockColor, + disabledColor: DarkColors.blockColor, + borderRadius: borderRadius, + onPressed: onPressed, + child: Row( + children: [ + Expanded( + child: Text(label, style: labelStyle), ), - )); + const SizedBox(width: 5), + item, + ], + ), + )); } } diff --git a/lib/widget/nav_header.dart b/lib/widget/nav_header.dart index 6c11bc2..273128e 100644 --- a/lib/widget/nav_header.dart +++ b/lib/widget/nav_header.dart @@ -14,40 +14,51 @@ class NavHeader extends StatelessWidget { var topPadding = ScreenHelper.topPadding; return Container( color: DarkColors.bgColor, - padding: EdgeInsets.only(top: topPadding), - height: 50 + topPadding, - child: Row( + // height: 50, + child: Column( children: [ - const SizedBox(width: 15), - SizedBox( - width: 40, - height: 40, - child: CupertinoButton( - padding: EdgeInsets.zero, - color: DarkColors.blockColor, - borderRadius: BorderRadius.circular(20), - onPressed: () => Navigator.of(context).pop(), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(width: isColseIcon ? 0 : 5), - Icon(isColseIcon ? Icons.close : Icons.arrow_back_ios, color: Colors.white, size: 16), - ], - ), + SizedBox(height: topPadding), + Container( + padding: const EdgeInsets.fromLTRB(0, 5, 0, 5), + child: Row( + children: [ + const SizedBox(width: 15), + SizedBox( + width: 40, + height: 40, + child: CupertinoButton( + padding: EdgeInsets.zero, + color: DarkColors.blockColor, + borderRadius: BorderRadius.circular(20), + onPressed: () => Navigator.of(context).pop(), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(width: isColseIcon ? 0 : 5), + Icon(isColseIcon ? Icons.close : Icons.arrow_back_ios, color: Colors.white, size: 16), + ], + ), + ), + ), + const SizedBox(width: 10), + Expanded( + child: Text( + title, + textAlign: TextAlign.center, + style: const TextStyle( + decoration: TextDecoration.none, + fontSize: 20, + fontFamily: 'RobotoMono', + fontWeight: FontWeight.w700, + color: Colors.white, + ), + ), + ), + const SizedBox(width: 10), + if (rightWidget != null) rightWidget! else const SizedBox(width: 55) + ], ), - ), - Expanded( - child: Center( - child: Text(title, - style: const TextStyle( - decoration: TextDecoration.none, - fontSize: 20, - fontFamily: 'RobotoMono', - fontWeight: FontWeight.w700, - color: Colors.white, - )), - )), - if (rightWidget != null) rightWidget! else const SizedBox(width: 55) + ) ], ), ); diff --git a/lib/widget/wallet_header.dart b/lib/widget/wallet_header.dart index 352f230..90fae2e 100644 --- a/lib/widget/wallet_header.dart +++ b/lib/widget/wallet_header.dart @@ -38,19 +38,14 @@ class WalletHeader extends StatelessWidget { ), child: Row( children: [ - SizedBox( - width: ScreenHelper.screenWidth - 70, + Expanded( child: Text( AppLocalizations.of(context).backup_your_wallet, style: const TextStyle(fontSize: 12, fontFamily: 'RobotoMono', fontWeight: FontWeight.w400, color: Colors.white), ), ), - const Spacer(), - const Icon( - Icons.arrow_forward_ios_rounded, - size: 12, - color: Colors.white, - ), + const SizedBox(width: 5), + const Icon(Icons.arrow_forward_ios_rounded, size: 12, color: Colors.white), ], ), ), @@ -59,7 +54,6 @@ class WalletHeader extends StatelessWidget { else const SizedBox(), Container( - height: 120, decoration: BoxDecoration( color: DarkColors.blockColor, borderRadius: BorderRadius.circular(10), @@ -93,7 +87,7 @@ class WalletHeader extends StatelessWidget { ), const SizedBox(height: 8), Text( - "${wallet.amount} XDAG", + wallet.hideBalance == true ? "****" : "${wallet.amount} XDAG", style: const TextStyle( fontSize: 16, fontFamily: 'RobotoMono', @@ -106,37 +100,29 @@ class WalletHeader extends StatelessWidget { ], ), ), - const Spacer(), - Padding( - padding: const EdgeInsets.fromLTRB(15, 0, 15, 5), - child: SizedBox( - height: 36, - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - CupertinoButton( - padding: EdgeInsets.zero, - child: Row( - children: [ - Text(wallet.address, - style: const TextStyle( - fontSize: 12, - fontFamily: 'RobotoMono', - fontWeight: FontWeight.w400, - color: Colors.white54, - )), - const SizedBox(width: 5), - const Icon(Icons.copy_rounded, size: 12, color: Colors.white54), - ], - ), - onPressed: () { - Clipboard.setData(ClipboardData(text: wallet.address)); - Helper.showToast(context, AppLocalizations.of(context).copied_to_clipboard); - }, + CupertinoButton( + padding: EdgeInsets.zero, + onPressed: () { + Clipboard.setData(ClipboardData(text: wallet.address)); + Helper.showToast(context, AppLocalizations.of(context).copied_to_clipboard); + }, + child: Container( + padding: const EdgeInsets.fromLTRB(15, 10, 15, 10), + // color: Colors.amber, + child: Row( + children: [ + Expanded( + child: Text( + wallet.address, + textAlign: TextAlign.right, + style: const TextStyle(fontSize: 12, fontFamily: 'RobotoMono', fontWeight: FontWeight.w400, color: Colors.white54), ), - ], - )), + ), + const SizedBox(width: 8), + const Icon(Icons.copy_rounded, size: 12, color: Colors.white), + ], + ), + ), ), ], ), diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 4c33e90..ff457c1 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -2,6 +2,8 @@ PODS: - flutter_secure_storage_macos (6.1.1): - FlutterMacOS - FlutterMacOS (1.0.0) + - package_info_plus (0.0.1): + - FlutterMacOS - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS @@ -14,6 +16,7 @@ PODS: DEPENDENCIES: - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) - FlutterMacOS (from `Flutter/ephemeral`) + - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) @@ -23,6 +26,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos FlutterMacOS: :path: Flutter/ephemeral + package_info_plus: + :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos path_provider_foundation: :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos shared_preferences_foundation: @@ -33,6 +38,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index c7f76b5..115a115 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -159,7 +159,6 @@ 004E9D3B1EC214022ADFF2EC /* Pods-Runner.release.xcconfig */, 30032FE4D83B5C59154925FE /* Pods-Runner.profile.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -420,9 +419,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 8LQTZ965C8; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "XDAG-Pro"; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.business"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -546,9 +549,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 8LQTZ965C8; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "XDAG-Pro"; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.business"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -566,9 +573,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 8LQTZ965C8; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "XDAG-Pro"; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.business"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/1024.png new file mode 100644 index 0000000..d84d87a Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/128.png new file mode 100644 index 0000000..2c29f2a Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/16.png new file mode 100644 index 0000000..069b9da Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/256 1.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/256 1.png new file mode 100644 index 0000000..3879bfb Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/256 1.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/256.png new file mode 100644 index 0000000..3879bfb Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/32 1.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/32 1.png new file mode 100644 index 0000000..2899711 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/32 1.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/32.png new file mode 100644 index 0000000..2899711 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/512 1.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/512 1.png new file mode 100644 index 0000000..2cdb30e Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/512 1.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/512.png new file mode 100644 index 0000000..2cdb30e Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/64.png new file mode 100644 index 0000000..22a0e3b Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/64.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index a2ec33f..e361225 100644 --- a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,68 +1,68 @@ { "images" : [ { - "size" : "16x16", + "filename" : "16.png", "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" + "scale" : "1x", + "size" : "16x16" }, { - "size" : "16x16", + "filename" : "32 1.png", "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" + "scale" : "2x", + "size" : "16x16" }, { - "size" : "32x32", + "filename" : "32.png", "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" + "scale" : "1x", + "size" : "32x32" }, { - "size" : "32x32", + "filename" : "64.png", "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" + "scale" : "2x", + "size" : "32x32" }, { - "size" : "128x128", + "filename" : "128.png", "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" + "scale" : "1x", + "size" : "128x128" }, { - "size" : "128x128", + "filename" : "256 1.png", "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" + "scale" : "2x", + "size" : "128x128" }, { - "size" : "256x256", + "filename" : "256.png", "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" + "scale" : "1x", + "size" : "256x256" }, { - "size" : "256x256", + "filename" : "512 1.png", "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" + "scale" : "2x", + "size" : "256x256" }, { - "size" : "512x512", + "filename" : "512.png", "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" + "scale" : "1x", + "size" : "512x512" }, { - "size" : "512x512", + "filename" : "1024.png", "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" + "scale" : "2x", + "size" : "512x512" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } } diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 82b6f9d..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index 13b35eb..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 0a3f5fa..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bdb5722..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index f083318..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index 326c0e7..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 2f1632c..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/Contents.json b/macos/Runner/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/macos/Runner/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib index 80e867a..40a6497 100644 --- a/macos/Runner/Base.lproj/MainMenu.xib +++ b/macos/Runner/Base.lproj/MainMenu.xib @@ -1,8 +1,8 @@ - + - + @@ -13,7 +13,7 @@ - + @@ -33,30 +33,11 @@ - - - - - - - - - - - - - - - - - - - @@ -66,278 +47,18 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index 7f47c3d..183bcf6 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -11,4 +11,4 @@ PRODUCT_NAME = xdag PRODUCT_BUNDLE_IDENTIFIER = com.xdag.io // The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. +PRODUCT_COPYRIGHT = Copyright © 2023 XDAG-Pro All rights reserved. diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index dddb8a3..6227822 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -8,5 +8,7 @@ com.apple.security.network.server + keychain-access-groups + diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index 852fa1a..423baf2 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -4,5 +4,7 @@ com.apple.security.app-sandbox + keychain-access-groups + diff --git a/pubspec.yaml b/pubspec.yaml index fa32ea3..222a372 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.7+8 +version: 1.0.8+9 environment: sdk: '>=2.19.2 <3.0.0'