diff --git a/lib/ui/views/main_screen/layouts/app_bar.dart b/lib/ui/views/main_screen/layouts/app_bar.dart index 41ea965..2a26e4d 100644 --- a/lib/ui/views/main_screen/layouts/app_bar.dart +++ b/lib/ui/views/main_screen/layouts/app_bar.dart @@ -24,7 +24,7 @@ class AppBarMainScreen extends StatelessWidget implements PreferredSizeWidget { backgroundColor: Colors.transparent, elevation: 0, leading: const Header(), - leadingWidth: Responsive.isMobile(context) ? null : 150, + leadingWidth: Responsive.isMobile(context) ? null : 155, title: Text( AppLocalizations.of(context)!.websitesListTitle, ), diff --git a/lib/ui/views/util/choose_path_sync_popup.dart b/lib/ui/views/util/choose_path_sync_popup.dart index 5e12074..e8e0221 100755 --- a/lib/ui/views/util/choose_path_sync_popup.dart +++ b/lib/ui/views/util/choose_path_sync_popup.dart @@ -267,325 +267,5 @@ class PathSyncPopup with FileMixin { ); }, ); - - return showDialog( - context: context, - builder: (context) { - return ScaffoldMessenger( - child: Builder( - builder: (context) { - return Scaffold( - backgroundColor: Colors.transparent, - body: StatefulBuilder( - builder: (context, setState) { - return AlertDialog( - contentPadding: const EdgeInsets.only( - top: 10, - ), - content: Container( - color: Colors.transparent, - padding: - const EdgeInsets.only(left: 20, right: 20, top: 10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Row( - children: [ - SelectionArea( - child: Text( - AppLocalizations.of(context)! - .pathSyncPopupTitle, - style: - Theme.of(context).textTheme.titleSmall, - ), - ), - const SizedBox(width: 15), - Expanded( - child: Container( - width: 25, - height: 1, - decoration: const BoxDecoration( - gradient: LinearGradient( - colors: [ - Color(0x003C89B9), - Color(0xFFCC00FF), - ], - stops: [0, 1], - begin: AlignmentDirectional.centerEnd, - end: AlignmentDirectional.centerStart, - ), - ), - ), - ), - ], - ), - const SizedBox( - width: 500, - height: 20, - ), - if (kIsWeb) - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Text( - AppLocalizations.of(context)! - .pathSyncPopupSelectArchiveFile, - ), - const SizedBox(width: 2), - TextButton( - onPressed: () async { - try { - final result = await FilePicker - .platform - .pickFiles( - type: FileType.custom, - allowedExtensions: [ - 'zip', - '7z', - 'rar', - ], - ); - if (result != null) { - zipFile = - result.files.first.bytes; - setState( - () { - path = - result.files.first.name; - }, - ); - } - } on Exception catch (e) { - log('Error while picking folder: $e'); - } - }, - child: const Icon(Icons.folder), - ), - ], - ), - Text( - path ?? '', - ), - ], - ) - else - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Text( - AppLocalizations.of(context)! - .pathSyncPopupSelectFolder, - ), - const SizedBox(width: 2), - TextButton( - onPressed: () async { - try { - final result = await FilePicker - .platform - .getDirectoryPath(); - if (result != null) { - setState( - () { - path = '$result/'; - }, - ); - } - } on Exception catch (e) { - log('Error while picking folder: $e'); - } - }, - child: const Icon(Icons.folder), - ), - ], - ), - Text( - path ?? '', - ), - const SizedBox( - height: 10, - ), - const WarningSizeLabel(), - const SizedBox( - height: 10, - ), - ], - ), - const SizedBox( - height: 20, - ), - Row( - children: [ - Text( - AppLocalizations.of(context)! - .pathSyncPopupGitignoreLabel, - ), - const SizedBox(width: 2), - SizedBox( - height: 30, - child: FittedBox( - fit: BoxFit.fill, - child: Switch( - thumbIcon: thumbIcon, - value: applyGitIgnoreRules ?? false, - onChanged: (value) { - setState( - () { - applyGitIgnoreRules = value; - }, - ); - }, - ), - ), - ), - IconButtonAnimated( - icon: Icon( - Icons.help, - color: - Theme.of(context).colorScheme.primary, - ), - onPressed: () { - launchUrl( - Uri.parse( - 'https://wiki.archethic.net/FAQ/aeweb#what-is-the-purpose-of-a-gitignore-file', - ), - ); - }, - color: Theme.of(context) - .colorScheme - .primaryContainer, - ), - ], - ), - const SizedBox( - height: 20, - ), - Container( - width: double.infinity, - padding: const EdgeInsets.only( - bottom: 20, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - AppButton( - labelBtn: - AppLocalizations.of(context)!.btn_close, - icon: Iconsax.close_square, - onPressed: () async { - Navigator.of(context).pop(); - }, - ), - AppButton( - labelBtn: - AppLocalizations.of(context)!.btn_sync, - icon: Iconsax.refresh_circle, - onPressed: () async { - late final Map? - localFiles; - if (kIsWeb) { - if (zipFile == null) { - ScaffoldMessenger.of(context) - .showSnackBar( - SnackBar( - backgroundColor: Theme.of(context) - .snackBarTheme - .backgroundColor, - content: Text( - AppLocalizations.of(context)! - .pathSyncPopupArchiveFileMissing, - style: Theme.of(context) - .snackBarTheme - .contentTextStyle, - ), - duration: - const Duration(seconds: 3), - ), - ); - return; - } - localFiles = - await FileMixin.listFilesFromZip( - zipFile!, - applyGitIgnoreRules: - applyGitIgnoreRules ?? false, - ); - } else { - if (path == null || path!.isEmpty) { - ScaffoldMessenger.of(context) - .showSnackBar( - SnackBar( - backgroundColor: Theme.of(context) - .snackBarTheme - .backgroundColor, - content: Text( - AppLocalizations.of(context)! - .pathSyncPopupPathMissing, - style: Theme.of(context) - .snackBarTheme - .contentTextStyle, - ), - duration: - const Duration(seconds: 3), - ), - ); - return; - } - - localFiles = - await FileMixin.listFilesFromPath( - path!, - applyGitIgnoreRules: - applyGitIgnoreRules ?? false, - ); - } - - final remoteFiles = - (await ReadWebsiteVersionUseCases() - .getRemote( - transactionRefAddress, - ))! - .content! - .metaData; - - context.go( - RoutesPath() - .updateWebsiteSync(genesisAddress), - extra: { - 'websiteName': websiteName, - 'genesisAddress': genesisAddress, - 'path': path ?? '', - 'zipFile': - zipFile ?? Uint8List.fromList([]), - 'localFiles': localFiles, - 'comparedFiles': SyncWebsiteUseCases() - .compareFileLists( - localFiles!, - remoteFiles, - ), - }, - ); - }, - ), - ], - ), - ), - ], - ), - ), - ); - }, - ), - ); - }, - ), - ); - }, - ); } } diff --git a/pubspec.lock b/pubspec.lock index 9bf07d7..8464792 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -36,20 +36,18 @@ packages: archethic_lib_dart: dependency: transitive description: - path: "." - ref: "114-abf-serialization-introduced-for-the-recipients-args" - resolved-ref: "2fe7a335d2fa4fff16d6f8d12ec36ecfad5d54cb" - url: "https://github.com/archethic-foundation/libdart.git" - source: git + name: archethic_lib_dart + sha256: d575a5c678cd012a646f4396fbafa9b6a7c8bcc2afffbf9a36a20c0316d0b62e + url: "https://pub.dev" + source: hosted version: "3.3.1" archethic_wallet_client: dependency: "direct main" description: - path: "." - ref: dev - resolved-ref: ef7943cdacc1b8ec400e4cc9565b8c7cd6a8009b - url: "https://github.com/archethic-foundation/archethic-wallet-client-dart.git" - source: git + name: archethic_wallet_client + sha256: cf568b688ae732ebe8885fec8439d0b742e6078704b7a500e0a975ef0b4c6726 + url: "https://pub.dev" + source: hosted version: "1.0.7" archive: dependency: "direct main" @@ -79,10 +77,10 @@ packages: dependency: "direct main" description: name: basic_utils - sha256: "1fb8c5493fc1b9500512b2e153c0b9bcc9e281621cde7f810420f4761be9e38d" + sha256: "2064b21d3c41ed7654bc82cc476fd65542e04d60059b74d5eed490a4da08fc6c" url: "https://pub.dev" source: hosted - version: "5.6.1" + version: "5.7.0" boolean_selector: dependency: transitive description: @@ -231,10 +229,10 @@ packages: dependency: transitive description: name: coverage - sha256: "595a29b55ce82d53398e1bcc2cba525d7bd7c59faeb2d2540e9d42c390cfeeeb" + sha256: ac86d3abab0f165e4b8f561280ff4e066bceaac83c424dd19f1ae2c2fcd12ca9 url: "https://pub.dev" source: hosted - version: "1.6.4" + version: "1.7.1" crypto: dependency: "direct main" description: @@ -263,18 +261,18 @@ packages: dependency: transitive description: name: custom_lint - sha256: "837821e4619c167fd5a547b03bb2fc6be7e65b800ec75528848429705c31ceba" + sha256: "68671c7b9cad03029c0270119169e32e801f8d87cec00367f233f4408d8913bd" url: "https://pub.dev" source: hosted - version: "0.5.3" + version: "0.5.5" custom_lint_core: dependency: transitive description: name: custom_lint_core - sha256: "3bdebdd52a42b4d6e5be9cd833ad1ecfbbc23e1020ca537060e54085497aea9c" + sha256: ae59cf9f211d22fe092ae1817243600ae7b5b815dc3b1985cefd7e5a9f41188c url: "https://pub.dev" source: hosted - version: "0.5.3" + version: "0.5.5" dart_style: dependency: transitive description: @@ -393,18 +391,18 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: f185ac890306b5779ecbd611f52502d8d4d63d27703ef73161ca0407e815f02c + sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da url: "https://pub.dev" source: hosted - version: "2.0.16" + version: "2.0.17" flutter_riverpod: dependency: "direct main" description: name: flutter_riverpod - sha256: bdba94be666ecb1beeb0f5a748d96cdd6a37215f27e6b48c7673b95cecb800c8 + sha256: "305203d1578f6857675f9730568548b03900ce53afd319f4aa9d2fa943334dbe" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.4.5" flutter_staggered_grid_view: dependency: "direct main" description: @@ -417,10 +415,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338" + sha256: bfc7cc3c75fe1282e8ce2e056d8fd1533f1a6848b65c379b4a5e7a9b623d3371 url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.0.8" flutter_treeview: dependency: "direct main" description: @@ -806,10 +804,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" + sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" path_provider_foundation: dependency: transitive description: @@ -934,34 +932,34 @@ packages: dependency: transitive description: name: riverpod - sha256: "2af3d127a6e4e34b89b8f1f018086f5ded04b8e538174f0510bba3e4c0d878b1" + sha256: "2e84315036e64c59affaff7443dea51247bc2fe704461a32f26a27986fb63d55" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.4.5" riverpod_analyzer_utils: dependency: transitive description: name: riverpod_analyzer_utils - sha256: d72d7096964baf288b55619fe48100001fc4564ab7923ed0a7f5c7650e03c0d6 + sha256: "22a089135785f27e601075023f93c6622c43ef28c3ba1bef303cfbc314028e64" url: "https://pub.dev" source: hosted - version: "0.3.4" + version: "0.4.3" riverpod_annotation: dependency: "direct main" description: name: riverpod_annotation - sha256: "388b03ed91b8f5126318fa43221fe078ebc20c81523dec9fcb5237cb5431d4dd" + sha256: "9330309e4400f40e39a2a1d1c340e775d0fd23451cf2dd2286e03c7896fd2bd5" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" riverpod_generator: dependency: "direct dev" description: name: riverpod_generator - sha256: "5b36ad2f2b562cffb37212e8d59390b25499bf045b732276e30a207b16a25f61" + sha256: "0a1c8eeb3dba2ce704eb1a4c3b8043716d52bedaaaa5b2725e0bde67ca38a46e" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.5" rxdart: dependency: transitive description: @@ -1107,10 +1105,10 @@ packages: dependency: "direct dev" description: name: test - sha256: d983a57c33dde6d44b1fb8635f67c91f4b41d26cf227c147963affa97d63563d + sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f url: "https://pub.dev" source: hosted - version: "1.24.8" + version: "1.24.9" test_api: dependency: transitive description: @@ -1123,10 +1121,10 @@ packages: dependency: transitive description: name: test_core - sha256: "2f866bf4b20c11327ac166ee6036bddafb7fe9e35505ff8324f788e66913f967" + sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a url: "https://pub.dev" source: hosted - version: "0.5.8" + version: "0.5.9" timing: dependency: transitive description: @@ -1147,66 +1145,66 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" + sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba url: "https://pub.dev" source: hosted - version: "6.1.14" + version: "6.2.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330 + sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.2.0" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f" + sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" url: "https://pub.dev" source: hosted - version: "6.1.5" + version: "6.2.0" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e + sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88 + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618" + sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.2.0" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5" + sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" url: "https://pub.dev" source: hosted - version: "2.0.20" + version: "2.2.0" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069" + sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" url: "https://pub.dev" source: hosted - version: "3.0.8" + version: "3.1.0" uuid: dependency: transitive description: @@ -1219,26 +1217,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: b16dadf7eb610e20da044c141b4a0199a5e8082ca21daba68322756f953ce714 + sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" url: "https://pub.dev" source: hosted - version: "1.1.9" + version: "1.1.9+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: a4b01403d5c613db115e30e71eca33f7e9e09f2d3c52c3fb84e16333ecddc539 + sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" url: "https://pub.dev" source: hosted - version: "1.1.9" + version: "1.1.9+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: d26c0e2f237476426523eb25512e4c09fa27c6d33ed659a0e69d79e20b5dc47f + sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 url: "https://pub.dev" source: hosted - version: "1.1.9" + version: "1.1.9+1" vector_math: dependency: transitive description: @@ -1251,10 +1249,10 @@ packages: dependency: transitive description: name: vm_service - sha256: a13d5503b4facefc515c8c587ce3cf69577a7b064a9f1220e005449cf1f64aad + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "12.0.0" + version: "13.0.0" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a8fe94c..c13af23 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,11 +10,11 @@ environment: dependencies: # A client dart library to interact with Archethic Wallet RPC API. - #archethic_wallet_client: ^1.0.6 - archethic_wallet_client: - git: - url: https://github.com/archethic-foundation/archethic-wallet-client-dart.git - ref: dev + archethic_wallet_client: ^1.0.7 + #archethic_wallet_client: + # git: + # url: https://github.com/archethic-foundation/archethic-wallet-client-dart.git + # ref: dev # Compression archive: ^3.3.7