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>
This commit is contained in:
tuxsudo 2024-08-13 07:15:47 -04:00 committed by GitHub
parent 1ce60d62b3
commit 0491ad9ee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 47 additions and 24 deletions

View file

@ -2,7 +2,7 @@ buildscript {
ext.kotlin_version = '1.8.21' ext.kotlin_version = '1.8.21'
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
dependencies { dependencies {
@ -15,7 +15,7 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

@ -5,7 +5,7 @@ buildscript {
ext.kotlin_version = '1.7.10' ext.kotlin_version = '1.7.10'
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
dependencies { dependencies {
@ -17,7 +17,7 @@ buildscript {
rootProject.allprojects { rootProject.allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
} }

View file

@ -5,7 +5,7 @@ buildscript {
ext.kotlin_version = '1.7.10' ext.kotlin_version = '1.7.10'
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
dependencies { dependencies {
@ -17,7 +17,7 @@ buildscript {
rootProject.allprojects { rootProject.allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
} }

View file

@ -7,6 +7,7 @@ import 'package:cake_wallet/view_model/settings/regular_list_item.dart';
import 'package:cake_wallet/view_model/support_view_model.dart'; import 'package:cake_wallet/view_model/support_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/themes/extensions/option_tile_theme.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
class SupportOtherLinksPage extends BasePage { class SupportOtherLinksPage extends BasePage {
@ -22,8 +23,11 @@ class SupportOtherLinksPage extends BasePage {
@override @override
Widget body(BuildContext context) { Widget body(BuildContext context) {
final iconColor = Theme.of(context).extension<SupportPageTheme>()!.iconColor; final iconColor = Theme.of(context).extension<SupportPageTheme>()!.iconColor;
final isLightMode = Theme.of(context).extension<OptionTileTheme>()?.useDarkImage ?? false;
return Container( return Container(
child: Center( child: Center(
child: ConstrainedBox( child: ConstrainedBox(
@ -37,16 +41,16 @@ class SupportOtherLinksPage extends BasePage {
if (item is RegularListItem) { if (item is RegularListItem) {
return SettingsCellWithArrow(title: item.title, handler: item.handler); return SettingsCellWithArrow(title: item.title, handler: item.handler);
} }
if (item is LinkListItem) { if (item is LinkListItem) {
bool hasLightIcon = false;
if (item.lightIcon != null) hasLightIcon = true;
return SettingsLinkProviderCell( return SettingsLinkProviderCell(
title: item.title, title: item.title,
icon: item.icon, icon: isLightMode && hasLightIcon ? item.lightIcon : item.icon,
iconColor: item.hasIconColor ? iconColor : null, iconColor: item.hasIconColor ? iconColor : null,
link: item.link, link: item.link,
linkTitle: item.linkTitle); linkTitle: item.linkTitle);
} }
return Container(); return Container();
}), }),
), ),

View file

@ -8,10 +8,12 @@ class LinkListItem extends SettingsListItem {
required this.link, required this.link,
required this.linkTitle, required this.linkTitle,
this.icon, this.icon,
this.lightIcon,
this.hasIconColor = false}) this.hasIconColor = false})
: super(title); : super(title);
final String? icon; final String? icon;
final String? lightIcon;
final String link; final String link;
final String linkTitle; final String linkTitle;
final bool hasIconColor; final bool hasIconColor;

View file

@ -33,11 +33,6 @@ abstract class SupportViewModelBase with Store {
icon: 'assets/images/Telegram.png', icon: 'assets/images/Telegram.png',
linkTitle: '@cakewallet_bot', linkTitle: '@cakewallet_bot',
link: 'https://t.me/cakewallet_bot'), link: 'https://t.me/cakewallet_bot'),
LinkListItem(
title: 'Twitter',
icon: 'assets/images/Twitter.png',
linkTitle: '@cakewallet',
link: 'https://twitter.com/cakewallet'),
LinkListItem( LinkListItem(
title: 'ChangeNow', title: 'ChangeNow',
icon: 'assets/images/change_now.png', icon: 'assets/images/change_now.png',
@ -46,7 +41,7 @@ abstract class SupportViewModelBase with Store {
LinkListItem( LinkListItem(
title: 'SideShift', title: 'SideShift',
icon: 'assets/images/sideshift.png', icon: 'assets/images/sideshift.png',
linkTitle: S.current.help, linkTitle: 'help.sideshift.ai',
link: 'https://help.sideshift.ai/en/'), link: 'https://help.sideshift.ai/en/'),
LinkListItem( LinkListItem(
title: 'SimpleSwap', title: 'SimpleSwap',
@ -58,19 +53,41 @@ abstract class SupportViewModelBase with Store {
icon: 'assets/images/exolix.png', icon: 'assets/images/exolix.png',
linkTitle: 'support@exolix.com', linkTitle: 'support@exolix.com',
link: 'mailto:support@exolix.com'), link: 'mailto:support@exolix.com'),
if (!isMoneroOnly) ... [ LinkListItem(
LinkListItem( title: 'Quantex',
title: 'Wyre', icon: 'assets/images/quantex.png',
icon: 'assets/images/wyre.png', linkTitle: 'help.myquantex.com',
linkTitle: S.current.submit_request, link: 'mailto:support@exolix.com'),
link: 'https://wyre-support.zendesk.com/hc/en-us/requests/new'), LinkListItem(
title: 'Trocador',
icon: 'assets/images/trocador.png',
linkTitle: 'mail@trocador.app',
link: 'mailto:mail@trocador.app'),
LinkListItem(
title: 'Onramper',
icon: 'assets/images/onramper_dark.png',
lightIcon: 'assets/images/onramper_light.png',
linkTitle: 'View exchanges',
link: 'https://guides.cakewallet.com/docs/service-support/buy/#onramper'),
LinkListItem(
title: 'DFX',
icon: 'assets/images/dfx_dark.png',
lightIcon: 'assets/images/dfx_light.png',
linkTitle: 'support@dfx.swiss',
link: 'mailto:support@dfx.swiss'),
if (!isMoneroOnly) ... [
LinkListItem( LinkListItem(
title: 'MoonPay', title: 'MoonPay',
icon: 'assets/images/moonpay.png', icon: 'assets/images/moonpay.png',
hasIconColor: true,
linkTitle: S.current.submit_request, 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: 'Robinhood Connect',
icon: 'assets/images/robinhood_dark.png',
lightIcon: 'assets/images/robinhood_light.png',
linkTitle: S.current.submit_request,
link: 'https://robinhood.com/contact')
]
//LinkListItem( //LinkListItem(
// title: 'Yat', // title: 'Yat',
// icon: 'assets/images/yat_mini_logo.png', // icon: 'assets/images/yat_mini_logo.png',