From cf20123edee0850cda05965a4a14ade98597e55a Mon Sep 17 00:00:00 2001 From: M Date: Fri, 5 Nov 2021 15:08:45 +0000 Subject: [PATCH] Add current route to router. Add yat contacts to support screen. --- .gitignore | 6 +++++- assets/images/yat_mini_logo.png | Bin 0 -> 6053 bytes lib/router.dart | 4 ++++ lib/src/screens/dashboard/dashboard_page.dart | 10 ++++++++-- .../widgets/settings_link_provider_cell.dart | 2 +- lib/view_model/support_view_model.dart | 8 +++++++- 6 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 assets/images/yat_mini_logo.png diff --git a/.gitignore b/.gitignore index 398fd61bd..2e5ffb5cb 100644 --- a/.gitignore +++ b/.gitignore @@ -104,4 +104,8 @@ ios/Flutter/.last_build_id \#*\# -.\#* \ No newline at end of file +.\#* + +ios/build +*.sublime-workspace +*.sublime-project diff --git a/assets/images/yat_mini_logo.png b/assets/images/yat_mini_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..82830c5ce1f9ed7defbe677d5656ad4478fd58fe GIT binary patch literal 6053 zcmZ`-2{@E{`yK{^Y}vAhD3rai3WQD0BnjC_1Z z{?^dakk@X6^a()ap=qQ^#_pdwaH1xk3%cl;836#H=K+AIH~`=m8H!p00B*?u0LzX5 z03-_lID>p#XR1nec)Ho>yBiq+B*-=`fQo_!03=%!07~-0`ln4nw#EL&F>nCYZw>$e zB_9C*Adcd1CXVti??W8$FT3W1=(I^P1OO=K;TAT5Hb#aJ7e5~qGBTN82sH1qDY2!u@;&PvSZ```rpu6Ba&6^w;N)Is@VEe`oRy__Hl?gVHA+ zX;~>5>Hj8k3x@v>*@@>5+3&voNT+%d45H=dgG9Ln1dz*u%BucO@c*#C%lm_G<`&@R zee0wPOJ8^(RPIm7zut)C?B9G7PrpDv@+CsSUG#ke-B9Eb|5X1c z;s0j*Bi2dZ5EFQ?o41WN+{exLk1oOFKL4xd-%2e%Z$Fed(#gf`r0Cz0e?b3c|ITy$ zA9)lN|C#3>oy~nn!2QYgh{wQ#NsAm1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 zHu3GHffUI^(nLf-H9HwBKIHlrFQ%}6dRGr`4b$zLeG|{)NvkZRM|}ub*xN(3HD9kC zE6$sqRjn6e(kz5!9K-JS552GNx;Pp=O@2XD!otK&Sf=xpS|QbRdT+@oA5ccbZK!q| z^2>AuL=8J|j|5E=ykflE9YY2pq8{`Un7MM_2blnkSWQ6;we$U8CT`^)xNq0u&$mf& zQZe^ufl|=oP=o89*vz1&m>mk9RvgDnO|0!wPUh%s$zQ&PG`i2?hpQNnkR*%5(726b zoshaE?oLJN5r~~VuUAcNG-}BgM{`xyq|!VG)j^$UrWtZn;~$B5{N=KKJ@6P55z+m6 Uhg$yb$=hmuoom{aFvpnx1Fqibt^fc4 literal 0 HcmV?d00001 diff --git a/lib/router.dart b/lib/router.dart index acf81043e..10898f625 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -68,7 +68,11 @@ import 'package:cake_wallet/src/screens/exchange_trade/exchange_trade_page.dart' import 'package:flutter/services.dart'; import 'package:hive/hive.dart'; +RouteSettings currentRouteSettings; + Route createRoute(RouteSettings settings) { + currentRouteSettings = settings; + switch (settings.name) { case Routes.welcome: return MaterialPageRoute(builder: (_) => createWelcomePage()); diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index 8c25e1ba0..9b55ac306 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -23,6 +23,7 @@ import 'package:mobx/mobx.dart'; import 'package:smooth_page_indicator/smooth_page_indicator.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:cake_wallet/main.dart'; +import 'package:cake_wallet/router.dart'; class DashboardPage extends BasePage { DashboardPage({ @@ -159,11 +160,16 @@ class DashboardPage extends BasePage { walletViewModel: walletViewModel)); pages.add(BalancePage(dashboardViewModel: walletViewModel)); pages.add(TransactionsPage(dashboardViewModel: walletViewModel)); - _isEffectsInstalled = true; - + if (walletViewModel.shouldShowYatPopup) { await Future.delayed(Duration(seconds: 1)); + + if (currentRouteSettings.name == Routes.preSeed + || currentRouteSettings.name == Routes.seed) { + return; + } + await showPopUp( context: context, builder: (BuildContext context) { diff --git a/lib/src/screens/settings/widgets/settings_link_provider_cell.dart b/lib/src/screens/settings/widgets/settings_link_provider_cell.dart index 643c1a77b..8c65067da 100644 --- a/lib/src/screens/settings/widgets/settings_link_provider_cell.dart +++ b/lib/src/screens/settings/widgets/settings_link_provider_cell.dart @@ -19,7 +19,7 @@ class SettingsLinkProviderCell extends StandardListRow { @override Widget buildLeading(BuildContext context) => - icon != null ? Image.asset(icon, color: iconColor) : null; + icon != null ? Image.asset(icon, color: iconColor, height: 30, width: 30) : null; @override Widget buildTrailing(BuildContext context) => Text(linkTitle, diff --git a/lib/view_model/support_view_model.dart b/lib/view_model/support_view_model.dart index 9b8dbe426..d355e0608 100644 --- a/lib/view_model/support_view_model.dart +++ b/lib/view_model/support_view_model.dart @@ -59,7 +59,13 @@ abstract class SupportViewModelBase with Store { icon: 'assets/images/moonpay.png', hasIconColor: true, linkTitle: S.current.submit_request, - link: 'https://support.moonpay.com/hc/en-gb/requests/new') + link: 'https://support.moonpay.com/hc/en-gb/requests/new'), + LinkListItem( + title: 'Yat', + icon: 'assets/images/yat_mini_logo.png', + hasIconColor: true, + linkTitle: 'support@y.at', + link: 'mailto:support@y.at') ]; } static const url = 'https://cakewallet.com/guide/';