Cw 397 chatwoot live support (#1011)

* 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>
This commit is contained in:
Konstantin Ullrich
2023-08-10 16:42:53 +03:00
committed by GitHub
co-authored by Rafael Saes Justin Ehrenhofer
parent e348f12491
commit af9b5ff10c
63 changed files with 762 additions and 260 deletions
+14 -15
View File
@@ -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://support.cakewallet.com/widget?website_token=${secrets.chatwootWebsiteToken}&locale=${locale}";
if (authToken.isNotEmpty)
supportUrl += "&cw_conversation=$authToken";
return supportUrl;
}
List<SettingsListItem> items;
}
}