mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-02 03:06:35 +00:00
Merge pull request #156 from cake-tech/CAKE-344-add-moonpay-contact-to-the-support-screen
CAKE-344 | added MoonPay contact to support page; applied icon color …
This commit is contained in:
commit
b48e7f50ed
5 changed files with 24 additions and 3 deletions
BIN
assets/images/moonpay.png
Normal file
BIN
assets/images/moonpay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
|
@ -7,6 +7,7 @@ class SettingsLinkProviderCell extends StandardListRow {
|
||||||
SettingsLinkProviderCell(
|
SettingsLinkProviderCell(
|
||||||
{@required String title,
|
{@required String title,
|
||||||
@required this.icon,
|
@required this.icon,
|
||||||
|
this.iconColor,
|
||||||
@required this.link,
|
@required this.link,
|
||||||
@required this.linkTitle})
|
@required this.linkTitle})
|
||||||
: super(title: title, isSelected: false, onTap: (BuildContext context) => _launchUrl(link) );
|
: super(title: title, isSelected: false, onTap: (BuildContext context) => _launchUrl(link) );
|
||||||
|
@ -14,10 +15,11 @@ class SettingsLinkProviderCell extends StandardListRow {
|
||||||
final String icon;
|
final String icon;
|
||||||
final String link;
|
final String link;
|
||||||
final String linkTitle;
|
final String linkTitle;
|
||||||
|
final Color iconColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget buildLeading(BuildContext context) =>
|
Widget buildLeading(BuildContext context) =>
|
||||||
icon != null ? Image.asset(icon) : null;
|
icon != null ? Image.asset(icon, color: iconColor) : null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget buildTrailing(BuildContext context) => Text(linkTitle,
|
Widget buildTrailing(BuildContext context) => Text(linkTitle,
|
||||||
|
|
|
@ -34,6 +34,7 @@ class SupportPage extends BasePage {
|
||||||
return SettingsLinkProviderCell(
|
return SettingsLinkProviderCell(
|
||||||
title: item.title,
|
title: item.title,
|
||||||
icon: item.icon,
|
icon: item.icon,
|
||||||
|
iconColor: item.iconColor,
|
||||||
link: item.link,
|
link: item.link,
|
||||||
linkTitle: item.linkTitle);
|
linkTitle: item.linkTitle);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:cake_wallet/view_model/settings/settings_list_item.dart';
|
import 'package:cake_wallet/view_model/settings/settings_list_item.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class LinkListItem extends SettingsListItem {
|
class LinkListItem extends SettingsListItem {
|
||||||
LinkListItem(
|
LinkListItem(
|
||||||
{@required String title,
|
{@required String title,
|
||||||
@required this.link,
|
@required this.link,
|
||||||
@required this.linkTitle,
|
@required this.linkTitle,
|
||||||
this.icon})
|
this.icon,
|
||||||
|
this.iconColor})
|
||||||
: super(title);
|
: super(title);
|
||||||
|
|
||||||
final String icon;
|
final String icon;
|
||||||
final String link;
|
final String link;
|
||||||
final String linkTitle;
|
final String linkTitle;
|
||||||
|
final Color iconColor;
|
||||||
}
|
}
|
|
@ -6,6 +6,9 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
import 'package:cake_wallet/di.dart';
|
||||||
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
|
import 'package:cake_wallet/themes/theme_base.dart';
|
||||||
|
|
||||||
part 'support_view_model.g.dart';
|
part 'support_view_model.g.dart';
|
||||||
|
|
||||||
|
@ -13,6 +16,11 @@ class SupportViewModel = SupportViewModelBase with _$SupportViewModel;
|
||||||
|
|
||||||
abstract class SupportViewModelBase with Store {
|
abstract class SupportViewModelBase with Store {
|
||||||
SupportViewModelBase() {
|
SupportViewModelBase() {
|
||||||
|
final currentTheme = getIt.get<SettingsStore>().currentTheme;
|
||||||
|
final iconColor = currentTheme.type == ThemeType.dark
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black;
|
||||||
|
|
||||||
items = [
|
items = [
|
||||||
RegularListItem(
|
RegularListItem(
|
||||||
title: S.current.faq,
|
title: S.current.faq,
|
||||||
|
@ -31,6 +39,7 @@ abstract class SupportViewModelBase with Store {
|
||||||
LinkListItem(
|
LinkListItem(
|
||||||
title: 'GitHub',
|
title: 'GitHub',
|
||||||
icon: 'assets/images/github.png',
|
icon: 'assets/images/github.png',
|
||||||
|
iconColor: iconColor,
|
||||||
linkTitle: S.current.apk_update,
|
linkTitle: S.current.apk_update,
|
||||||
link: 'https://github.com/cake-tech/cake_wallet/releases'),
|
link: 'https://github.com/cake-tech/cake_wallet/releases'),
|
||||||
LinkListItem(
|
LinkListItem(
|
||||||
|
@ -52,7 +61,13 @@ abstract class SupportViewModelBase with Store {
|
||||||
title: 'Wyre',
|
title: 'Wyre',
|
||||||
icon: 'assets/images/wyre.png',
|
icon: 'assets/images/wyre.png',
|
||||||
linkTitle: S.current.submit_request,
|
linkTitle: S.current.submit_request,
|
||||||
link: 'https://wyre-support.zendesk.com/hc/en-us/requests/new')
|
link: 'https://wyre-support.zendesk.com/hc/en-us/requests/new'),
|
||||||
|
LinkListItem(
|
||||||
|
title: 'MoonPay',
|
||||||
|
icon: 'assets/images/moonpay.png',
|
||||||
|
iconColor: iconColor,
|
||||||
|
linkTitle: S.current.submit_request,
|
||||||
|
link: 'https://support.moonpay.com/hc/en-gb/requests/new')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
static const url = 'https://cakewallet.com/guide/';
|
static const url = 'https://cakewallet.com/guide/';
|
||||||
|
|
Loading…
Reference in a new issue