mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
Re add chatwoot (#1044)
* Revert "Revert "Cw 397 chatwoot live support (#1011)"" This reverts commit ecdc7baa2e3c8f46c3c5013f56c8b864f088ec9f. * Re-add chatwoot Change chatwoot base url
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
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/regular_list_item.dart';
|
||||
import 'package:cake_wallet/view_model/settings/settings_list_item.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:url_launcher/url_launcher.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';
|
||||
|
||||
@@ -15,14 +12,6 @@ class SupportViewModel = SupportViewModelBase with _$SupportViewModel;
|
||||
abstract class SupportViewModelBase with Store {
|
||||
SupportViewModelBase()
|
||||
: items = [
|
||||
RegularListItem(
|
||||
title: S.current.faq,
|
||||
handler: (BuildContext context) async {
|
||||
try {
|
||||
await launch(url);
|
||||
} catch (e) {}
|
||||
},
|
||||
),
|
||||
LinkListItem(
|
||||
title: 'Email',
|
||||
linkTitle: 'support@cakewallet.com',
|
||||
@@ -85,7 +74,17 @@ abstract class SupportViewModelBase with Store {
|
||||
// link: 'mailto:support@y.at')
|
||||
];
|
||||
|
||||
static const url = 'https://guides.cakewallet.com';
|
||||
final guidesUrl = 'https://guides.cakewallet.com';
|
||||
|
||||
String fetchUrl({String locale = "en", String authToken = ""}) {
|
||||
var supportUrl =
|
||||
"https://app.chatwoot.com/widget?website_token=${secrets.chatwootWebsiteToken}&locale=${locale}";
|
||||
|
||||
if (authToken.isNotEmpty)
|
||||
supportUrl += "&cw_conversation=$authToken";
|
||||
|
||||
return supportUrl;
|
||||
}
|
||||
|
||||
List<SettingsListItem> items;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user