From e34df895de3ace6a519f76dd4ac9c44cfd8ee510 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Fri, 8 Sep 2023 16:23:10 -0500 Subject: [PATCH] add rest of tor status row to wallet network settings view --- .../wallet_network_settings_view.dart | 93 +++++++++++++++++-- 1 file changed, 85 insertions(+), 8 deletions(-) diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart index c080200d0..c028630d8 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart @@ -550,14 +550,6 @@ class _WalletNetworkSettingsViewState "Synchronized", style: STextStyles.w600_12(context), ), - Text( - "100%", - style: STextStyles.syncPercent(context).copyWith( - color: Theme.of(context) - .extension()! - .accentColorGreen, - ), - ), ], ), ), @@ -813,6 +805,91 @@ class _WalletNetworkSettingsViewState SizedBox( height: isDesktop ? 12 : 9, ), + RoundedWhiteContainer( + borderColor: isDesktop + ? Theme.of(context).extension()!.background + : null, + padding: + isDesktop ? const EdgeInsets.all(16) : const EdgeInsets.all(12), + child: Row( + children: [ + if (TorService.sharedInstance.enabled) + Container( + width: _iconSize, + height: _iconSize, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .accentColorGreen + .withOpacity(0.2), + borderRadius: BorderRadius.circular(_iconSize), + ), + child: Center( + child: SvgPicture.asset( + Assets.svg.tor, + height: isDesktop ? 19 : 14, + width: isDesktop ? 19 : 14, + color: Theme.of(context) + .extension()! + .accentColorGreen, + ), + ), + ), + if (!TorService.sharedInstance.enabled) + Container( + width: _iconSize, + height: _iconSize, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .textDark + .withOpacity(0.08), + borderRadius: BorderRadius.circular(_iconSize), + ), + child: Center( + child: SvgPicture.asset( + Assets.svg.tor, + height: isDesktop ? 19 : 14, + width: isDesktop ? 19 : 14, + color: Theme.of(context) + .extension()! + .textDark, + ), + ), + ), + SizedBox( + width: _boxPadding, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Tor status", + style: STextStyles.desktopTextExtraExtraSmall(context) + .copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ), + ), + if (TorService.sharedInstance.enabled) + Text( + "Connected", + style: STextStyles.desktopTextExtraExtraSmall(context), + ), + if (!TorService.sharedInstance.enabled) + Text( + "Disconnected", + style: STextStyles.desktopTextExtraExtraSmall(context), + ), + ], + ), + ], + ), + ), + SizedBox( + height: isDesktop ? 32 : 20, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [