add 2fa guid and how to use sections
Serhii committed
Nov 21, 2023 at 14:46 UTC
306e4671b4aedf3699c7daaa24cae7f9c2482726
2 files changed
+29
-1
lib/src/screens/setup_2fa/setup_2fa.dart
+9
-1
@@ -19,6 +19,9 @@ class Setup2FAPage extends BasePage {
19
20
@override
21
Widget body(BuildContext context) {
22
+ final cake2FAGuideTitle = 'Cake 2FA Guide';
23
+ final cake2FAGuideUri =
24
+ Uri.parse('https://guides.cakewallet.com/docs/advanced-features/authentication');
25
return SingleChildScrollView(
26
child: Column(
27
crossAxisAlignment: CrossAxisAlignment.start,
@@ -50,7 +53,7 @@ class Setup2FAPage extends BasePage {
53
],
54
),
55
),
53
- SizedBox(height: 86),
56
+ SizedBox(height: 56),
57
SettingsCellWithArrow(
58
title: S.current.setup_totp_recommended,
59
handler: (_) {
@@ -59,6 +62,11 @@ class Setup2FAPage extends BasePage {
62
},
63
),
64
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
65
+ SettingsCellWithArrow(
66
+ title: cake2FAGuideTitle,
67
+ handler: (_) => Navigator.of(context)
68
+ .pushNamed(Routes.webViewPage, arguments: [cake2FAGuideTitle, cake2FAGuideUri])),
69
+ StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
70
],
71
),
72
);
lib/src/screens/setup_2fa/setup_2fa_qr_page.dart
+20
@@ -30,6 +30,9 @@ class Setup2FAQRPage extends BasePage {
30
width: 12,
31
color: Color(0xFF355688),
32
);
33
+ final cake2FAHowToUseTitle = 'How to use';
34
+ final cake2FAHowToUseUrl = Uri.parse(
35
+ 'https://guides.cakewallet.com/docs/advanced-features/authentication/#enabling-cake-2fa');
36
return Padding(
37
padding: const EdgeInsets.symmetric(horizontal: 24),
38
child: Column(
@@ -180,6 +183,23 @@ class Setup2FAQRPage extends BasePage {
183
),
184
SizedBox(height: 8),
185
StandardListSeparator(),
186
+ SizedBox(height: 16),
187
+ GestureDetector(
188
+ onTap: () => Navigator.of(context).pushNamed(Routes.webViewPage,
189
+ arguments: [cake2FAHowToUseTitle, cake2FAHowToUseUrl]),
190
+ child: Row(
191
+ mainAxisSize: MainAxisSize.min,
192
+ mainAxisAlignment: MainAxisAlignment.center,
193
+ children: [
194
+ Text(cake2FAHowToUseTitle,
195
+ style: TextStyle(
196
+ decoration: TextDecoration.underline,
197
+ fontSize: 16,
198
+ fontWeight: FontWeight.w700,
199
+ )),
200
+ Icon(Icons.info_outline,size: 20)
201
+ ],
202
+ )),
203
Spacer(),
204
PrimaryButton(
205
onPressed: () {