Update support links (#1595)

* Update support links list, add proper support for light/dark icons, update provider icons * Update trocador icon * Update variable * trial fix for android build --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>

tuxsudo committed Aug 13, 2024 at 07:15 UTC 0491ad9ee24175240556ad4bb63634b52d78f0b2
12 files changed +47 -24
android/build.gradle
+2 -2
@@ -2,7 +2,7 @@ buildscript {
2 ext.kotlin_version = '1.8.21'
3 repositories {
4 google()
5 - jcenter()
5 + mavenCentral()
6 }
7
8 dependencies {
@@ -15,7 +15,7 @@ buildscript {
15 allprojects {
16 repositories {
17 google()
18 - jcenter()
18 + mavenCentral()
19 }
20 }
21
assets/images/dfx_dark.png
Binary files a/assets/images/dfx_dark.png and b/assets/images/dfx_dark.png differ
assets/images/dfx_light.png
Binary files a/assets/images/dfx_light.png and b/assets/images/dfx_light.png differ
assets/images/moonpay.png
Binary files a/assets/images/moonpay.png and b/assets/images/moonpay.png differ
assets/images/moonpay_dark.png
Binary files a/assets/images/moonpay_dark.png and b/assets/images/moonpay_dark.png differ
assets/images/moonpay_light.png
Binary files a/assets/images/moonpay_light.png and b/assets/images/moonpay_light.png differ
assets/images/trocador.png
Binary files a/assets/images/trocador.png and b/assets/images/trocador.png differ
cw_haven/android/build.gradle
+2 -2
@@ -5,7 +5,7 @@ buildscript {
5 ext.kotlin_version = '1.7.10'
6 repositories {
7 google()
8 - jcenter()
8 + mavenCentral()
9 }
10
11 dependencies {
@@ -17,7 +17,7 @@ buildscript {
17 rootProject.allprojects {
18 repositories {
19 google()
20 - jcenter()
20 + mavenCentral()
21 }
22 }
23
cw_shared_external/android/build.gradle
+2 -2
@@ -5,7 +5,7 @@ buildscript {
5 ext.kotlin_version = '1.7.10'
6 repositories {
7 google()
8 - jcenter()
8 + mavenCentral()
9 }
10
11 dependencies {
@@ -17,7 +17,7 @@ buildscript {
17 rootProject.allprojects {
18 repositories {
19 google()
20 - jcenter()
20 + mavenCentral()
21 }
22 }
23
lib/src/screens/support_other_links/support_other_links_page.dart
+7 -3
@@ -7,6 +7,7 @@ import 'package:cake_wallet/view_model/settings/regular_list_item.dart';
7 import 'package:cake_wallet/view_model/support_view_model.dart';
8 import 'package:flutter/material.dart';
9 import 'package:cake_wallet/src/screens/base_page.dart';
10 +import 'package:cake_wallet/themes/extensions/option_tile_theme.dart';
11 import 'package:cake_wallet/generated/i18n.dart';
12
13 class SupportOtherLinksPage extends BasePage {
@@ -22,8 +23,11 @@ class SupportOtherLinksPage extends BasePage {
23
24 @override
25 Widget body(BuildContext context) {
26 +
27 final iconColor = Theme.of(context).extension<SupportPageTheme>()!.iconColor;
28
29 + final isLightMode = Theme.of(context).extension<OptionTileTheme>()?.useDarkImage ?? false;
30 +
31 return Container(
32 child: Center(
33 child: ConstrainedBox(
@@ -37,16 +41,16 @@ class SupportOtherLinksPage extends BasePage {
41 if (item is RegularListItem) {
42 return SettingsCellWithArrow(title: item.title, handler: item.handler);
43 }
40 -
44 if (item is LinkListItem) {
45 + bool hasLightIcon = false;
46 + if (item.lightIcon != null) hasLightIcon = true;
47 return SettingsLinkProviderCell(
48 title: item.title,
44 - icon: item.icon,
49 + icon: isLightMode && hasLightIcon ? item.lightIcon : item.icon,
50 iconColor: item.hasIconColor ? iconColor : null,
51 link: item.link,
52 linkTitle: item.linkTitle);
53 }
49 -
54 return Container();
55 }),
56 ),
lib/view_model/settings/link_list_item.dart
+2
@@ -8,10 +8,12 @@ class LinkListItem extends SettingsListItem {
8 required this.link,
9 required this.linkTitle,
10 this.icon,
11 + this.lightIcon,
12 this.hasIconColor = false})
13 : super(title);
14
15 final String? icon;
16 + final String? lightIcon;
17 final String link;
18 final String linkTitle;
19 final bool hasIconColor;
lib/view_model/support_view_model.dart
+32 -15
@@ -33,11 +33,6 @@ abstract class SupportViewModelBase with Store {
33 icon: 'assets/images/Telegram.png',
34 linkTitle: '@cakewallet_bot',
35 link: 'https://t.me/cakewallet_bot'),
36 - LinkListItem(
37 - title: 'Twitter',
38 - icon: 'assets/images/Twitter.png',
39 - linkTitle: '@cakewallet',
40 - link: 'https://twitter.com/cakewallet'),
36 LinkListItem(
37 title: 'ChangeNow',
38 icon: 'assets/images/change_now.png',
@@ -46,7 +41,7 @@ abstract class SupportViewModelBase with Store {
41 LinkListItem(
42 title: 'SideShift',
43 icon: 'assets/images/sideshift.png',
49 - linkTitle: S.current.help,
44 + linkTitle: 'help.sideshift.ai',
45 link: 'https://help.sideshift.ai/en/'),
46 LinkListItem(
47 title: 'SimpleSwap',
@@ -58,19 +53,41 @@ abstract class SupportViewModelBase with Store {
53 icon: 'assets/images/exolix.png',
54 linkTitle: 'support@exolix.com',
55 link: 'mailto:support@exolix.com'),
61 - if (!isMoneroOnly) ... [
62 - LinkListItem(
63 - title: 'Wyre',
64 - icon: 'assets/images/wyre.png',
65 - linkTitle: S.current.submit_request,
66 - link: 'https://wyre-support.zendesk.com/hc/en-us/requests/new'),
56 + LinkListItem(
57 + title: 'Quantex',
58 + icon: 'assets/images/quantex.png',
59 + linkTitle: 'help.myquantex.com',
60 + link: 'mailto:support@exolix.com'),
61 + LinkListItem(
62 + title: 'Trocador',
63 + icon: 'assets/images/trocador.png',
64 + linkTitle: 'mail@trocador.app',
65 + link: 'mailto:mail@trocador.app'),
66 + LinkListItem(
67 + title: 'Onramper',
68 + icon: 'assets/images/onramper_dark.png',
69 + lightIcon: 'assets/images/onramper_light.png',
70 + linkTitle: 'View exchanges',
71 + link: 'https://guides.cakewallet.com/docs/service-support/buy/#onramper'),
72 + LinkListItem(
73 + title: 'DFX',
74 + icon: 'assets/images/dfx_dark.png',
75 + lightIcon: 'assets/images/dfx_light.png',
76 + linkTitle: 'support@dfx.swiss',
77 + link: 'mailto:support@dfx.swiss'),
78 + if (!isMoneroOnly) ... [
79 LinkListItem(
80 title: 'MoonPay',
81 icon: 'assets/images/moonpay.png',
70 - hasIconColor: true,
82 linkTitle: S.current.submit_request,
72 - link: 'https://support.moonpay.com/hc/en-gb/requests/new')
73 - ]
83 + link: 'https://support.moonpay.com/hc/en-gb/requests/new'),
84 + LinkListItem(
85 + title: 'Robinhood Connect',
86 + icon: 'assets/images/robinhood_dark.png',
87 + lightIcon: 'assets/images/robinhood_light.png',
88 + linkTitle: S.current.submit_request,
89 + link: 'https://robinhood.com/contact')
90 + ]
91 //LinkListItem(
92 // title: 'Yat',
93 // icon: 'assets/images/yat_mini_logo.png',