Skip to content

Commit

Permalink
Update support links (#1595)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
tuxpizza and OmarHatem28 authored Aug 13, 2024
1 parent 1ce60d6 commit 0491ad9
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 24 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ buildscript {
ext.kotlin_version = '1.8.21'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -15,7 +15,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
Binary file modified assets/images/dfx_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/dfx_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/moonpay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/moonpay_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/moonpay_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/trocador.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions cw_haven/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -17,7 +17,7 @@ buildscript {
rootProject.allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
4 changes: 2 additions & 2 deletions cw_shared_external/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -17,7 +17,7 @@ buildscript {
rootProject.allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:flutter/material.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';

class SupportOtherLinksPage extends BasePage {
Expand All @@ -22,8 +23,11 @@ class SupportOtherLinksPage extends BasePage {

@override
Widget body(BuildContext context) {

final iconColor = Theme.of(context).extension<SupportPageTheme>()!.iconColor;

final isLightMode = Theme.of(context).extension<OptionTileTheme>()?.useDarkImage ?? false;

return Container(
child: Center(
child: ConstrainedBox(
Expand All @@ -37,16 +41,16 @@ class SupportOtherLinksPage extends BasePage {
if (item is RegularListItem) {
return SettingsCellWithArrow(title: item.title, handler: item.handler);
}

if (item is LinkListItem) {
bool hasLightIcon = false;
if (item.lightIcon != null) hasLightIcon = true;
return SettingsLinkProviderCell(
title: item.title,
icon: item.icon,
icon: isLightMode && hasLightIcon ? item.lightIcon : item.icon,
iconColor: item.hasIconColor ? iconColor : null,
link: item.link,
linkTitle: item.linkTitle);
}

return Container();
}),
),
Expand Down
2 changes: 2 additions & 0 deletions lib/view_model/settings/link_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ class LinkListItem extends SettingsListItem {
required this.link,
required this.linkTitle,
this.icon,
this.lightIcon,
this.hasIconColor = false})
: super(title);

final String? icon;
final String? lightIcon;
final String link;
final String linkTitle;
final bool hasIconColor;
Expand Down
47 changes: 32 additions & 15 deletions lib/view_model/support_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ abstract class SupportViewModelBase with Store {
icon: 'assets/images/Telegram.png',
linkTitle: '@cakewallet_bot',
link: 'https://t.me/cakewallet_bot'),
LinkListItem(
title: 'Twitter',
icon: 'assets/images/Twitter.png',
linkTitle: '@cakewallet',
link: 'https://twitter.com/cakewallet'),
LinkListItem(
title: 'ChangeNow',
icon: 'assets/images/change_now.png',
Expand All @@ -46,7 +41,7 @@ abstract class SupportViewModelBase with Store {
LinkListItem(
title: 'SideShift',
icon: 'assets/images/sideshift.png',
linkTitle: S.current.help,
linkTitle: 'help.sideshift.ai',
link: 'https://help.sideshift.ai/en/'),
LinkListItem(
title: 'SimpleSwap',
Expand All @@ -58,19 +53,41 @@ abstract class SupportViewModelBase with Store {
icon: 'assets/images/exolix.png',
linkTitle: '[email protected]',
link: 'mailto:[email protected]'),
if (!isMoneroOnly) ... [
LinkListItem(
title: 'Wyre',
icon: 'assets/images/wyre.png',
linkTitle: S.current.submit_request,
link: 'https://wyre-support.zendesk.com/hc/en-us/requests/new'),
LinkListItem(
title: 'Quantex',
icon: 'assets/images/quantex.png',
linkTitle: 'help.myquantex.com',
link: 'mailto:[email protected]'),
LinkListItem(
title: 'Trocador',
icon: 'assets/images/trocador.png',
linkTitle: '[email protected]',
link: 'mailto:[email protected]'),
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: '[email protected]',
link: 'mailto:[email protected]'),
if (!isMoneroOnly) ... [
LinkListItem(
title: 'MoonPay',
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: '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(
// title: 'Yat',
// icon: 'assets/images/yat_mini_logo.png',
Expand Down

0 comments on commit 0491ad9

Please sign in to comment.