mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-10-30 08:57:38 +00:00
af9b5ff10c
* initial button refactor and gradient background * CW-397 Use a separate Hive instance to avoid Issues with plugins using Hive * CW-397 Add Support Page Strings * CW-397 Add new Support Page * CW-397 Add Support Live Chat Page * CW-397 Add Hive Type Ids Doc * CW-397 Use Newer Chatwoot SDK Version and add new Images * CW-397 Update pubspec_base.yaml * CW-397 Add own Chatwoot Widget * Lowercase `s` skip-ci * CW-397 Fix WebMessageListener * CW-397 Fix Merge conflicts * CW-397 Add Erc20 Hive Type ID * CW-397 Fix Ethereum Hive Error * CW-397 Revert to Restore Button * CW-397 Only use In App chat on mobile * CW-397 Move Chatwoot Website Token to secrets * CW-397 Add Chatwoot Website Token to workflow * CW-397 Move Chatwoot fetchUrl to Support View Model --------- Co-authored-by: Rafael Saes <git@saes.io> Co-authored-by: Justin Ehrenhofer <justin.ehrenhofer@gmail.com>
90 lines
3.1 KiB
Dart
90 lines
3.1 KiB
Dart
import 'package:cake_wallet/generated/i18n.dart';
|
|
import 'package:cake_wallet/view_model/settings/link_list_item.dart';
|
|
import 'package:cake_wallet/view_model/settings/settings_list_item.dart';
|
|
import 'package:cake_wallet/wallet_type_utils.dart';
|
|
import 'package:mobx/mobx.dart';
|
|
import 'package:cake_wallet/.secrets.g.dart' as secrets;
|
|
|
|
part 'support_view_model.g.dart';
|
|
|
|
class SupportViewModel = SupportViewModelBase with _$SupportViewModel;
|
|
|
|
abstract class SupportViewModelBase with Store {
|
|
SupportViewModelBase()
|
|
: items = [
|
|
LinkListItem(
|
|
title: 'Email',
|
|
linkTitle: 'support@cakewallet.com',
|
|
link: 'mailto:support@cakewallet.com'),
|
|
if (!isMoneroOnly)
|
|
LinkListItem(
|
|
title: 'Website',
|
|
linkTitle: 'cakewallet.com',
|
|
link: 'https://cakewallet.com'),
|
|
if (!isMoneroOnly)
|
|
LinkListItem(
|
|
title: 'GitHub',
|
|
icon: 'assets/images/github.png',
|
|
hasIconColor: true,
|
|
linkTitle: S.current.apk_update,
|
|
link: 'https://github.com/cake-tech/cake_wallet/releases'),
|
|
LinkListItem(
|
|
title: 'Telegram',
|
|
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',
|
|
linkTitle: 'support@changenow.io',
|
|
link: 'mailto:support@changenow.io'),
|
|
LinkListItem(
|
|
title: 'SideShift',
|
|
icon: 'assets/images/sideshift.png',
|
|
linkTitle: S.current.help,
|
|
link: 'https://help.sideshift.ai/en/'),
|
|
LinkListItem(
|
|
title: 'SimpleSwap',
|
|
icon: 'assets/images/simpleSwap.png',
|
|
linkTitle: 'support@simpleswap.io',
|
|
link: 'mailto:support@simpleswap.io'),
|
|
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: 'MoonPay',
|
|
icon: 'assets/images/moonpay.png',
|
|
hasIconColor: true,
|
|
linkTitle: S.current.submit_request,
|
|
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')
|
|
];
|
|
|
|
final guidesUrl = 'https://guides.cakewallet.com';
|
|
|
|
String fetchUrl({String locale = "en", String authToken = ""}) {
|
|
var supportUrl =
|
|
"https://support.cakewallet.com/widget?website_token=${secrets.chatwootWebsiteToken}&locale=${locale}";
|
|
|
|
if (authToken.isNotEmpty)
|
|
supportUrl += "&cw_conversation=$authToken";
|
|
|
|
return supportUrl;
|
|
}
|
|
|
|
List<SettingsListItem> items;
|
|
}
|