From d5a2fb593a343772035954a49c565cc5a9ce0270 Mon Sep 17 00:00:00 2001 From: redDwarf03 Date: Mon, 25 Nov 2024 09:05:00 +0100 Subject: [PATCH] chore: :sparkles: Don't display the menu in desktop mode & web mode --- lib/l10n/intl_en.arb | 4 +- lib/l10n/intl_fr.arb | 4 +- lib/ui/views/sheets/dapp_sheet.dart | 59 ++++++++++++----------------- 3 files changed, 29 insertions(+), 38 deletions(-) diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 185b094e6..838ebec3d 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -473,8 +473,8 @@ "aeBridgeHeader": "Bridge", "aeSwapEarnHeader": "Earn UCO token", "price": "Price", - "aeBridgeLaunchMessage": "Please launch the aeBridge application to proceed. It will open in your default browser.", - "aeBridgeLaunchButton": "Launch aeBridge", + "dAppLaunchMessage": "The application is not available directly on this platform. Please launch the application via a browser to continue. It will open in your default browser.", + "dAppLaunchButton": "Launch the dApp", "receiveHeader": "Receive assets on Archethic", "receiveCopy": "Click to copy the address", "earnValueLbl": "Earn", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index c1d24e5fb..3a0999a69 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -453,8 +453,8 @@ "aeBridgeHeader": "Bridge", "aeSwapEarnHeader": "Gagner des UCO", "price": "Prix", - "aeSwapLaunchMessage": "Veuillez lancer l'application aeSwap pour continuer. Elle s'ouvrira dans votre navigateur par défaut.", - "aeSwapLaunchButton": "Lancer aeSwap", + "dAppLaunchMessage": "L'application n'est pas disponible directement sur cette plateforme. Veuillez lancer l'application via un navigateur pour continuer. Elle s'ouvrira dans votre navigateur par défaut.", + "dAppLaunchButton": "Lancer la dApp", "receiveHeader": "Recevoir des actifs sur Archethic", "receiveCopy": "Cliquez pour copier l'adresse", "earnValueLbl": "Gagner", diff --git a/lib/ui/views/sheets/dapp_sheet.dart b/lib/ui/views/sheets/dapp_sheet.dart index 1acee5a79..d679f5798 100755 --- a/lib/ui/views/sheets/dapp_sheet.dart +++ b/lib/ui/views/sheets/dapp_sheet.dart @@ -127,41 +127,32 @@ class DAppSheetState extends ConsumerState } if (UniversalPlatform.isDesktopOrWeb) { - return Stack( - children: [ - SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 20), - child: Column( - children: [ - ArchethicScrollbar( - child: Padding( - padding: EdgeInsets.only( - top: MediaQuery.of(context).padding.top + 10, - bottom: 80, - ), - child: Padding( - padding: const EdgeInsets.only(top: 10), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - AppLocalizations.of(context)! - .aeBridgeLaunchMessage, - ), - ], - ), - ], - ), - ), - ), - ), - ], + + return SafeArea( + child: Padding( + padding: const EdgeInsets.all(20), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + AppLocalizations.of(context)!.dAppLaunchMessage, ), - ), + SizedBox( + height: 55, + child: AppButtonTiny( + AppButtonTinyType.primary, + AppLocalizations.of(context)!.dAppLaunchButton, + Dimens.buttonBottomDimens, + key: const Key('LaunchApplication'), + onPressed: dappUrl != null + ? () async { + await launchUrl(Uri.parse(dappUrl!)); + } + : null, + disabled: dappUrl == null, + ), + ), + ], ), SizedBox( height: 55,