add 2fa guid and how to use sections

This commit is contained in:
Serhii 2023-11-21 14:46:11 +02:00
parent 56619b8546
commit 306e4671b4
2 changed files with 29 additions and 1 deletions

View file

@ -19,6 +19,9 @@ class Setup2FAPage extends BasePage {
@override
Widget body(BuildContext context) {
final cake2FAGuideTitle = 'Cake 2FA Guide';
final cake2FAGuideUri =
Uri.parse('https://guides.cakewallet.com/docs/advanced-features/authentication');
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -50,7 +53,7 @@ class Setup2FAPage extends BasePage {
],
),
),
SizedBox(height: 86),
SizedBox(height: 56),
SettingsCellWithArrow(
title: S.current.setup_totp_recommended,
handler: (_) {
@ -59,6 +62,11 @@ class Setup2FAPage extends BasePage {
},
),
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
SettingsCellWithArrow(
title: cake2FAGuideTitle,
handler: (_) => Navigator.of(context)
.pushNamed(Routes.webViewPage, arguments: [cake2FAGuideTitle, cake2FAGuideUri])),
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
],
),
);

View file

@ -30,6 +30,9 @@ class Setup2FAQRPage extends BasePage {
width: 12,
color: Color(0xFF355688),
);
final cake2FAHowToUseTitle = 'How to use';
final cake2FAHowToUseUrl = Uri.parse(
'https://guides.cakewallet.com/docs/advanced-features/authentication/#enabling-cake-2fa');
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: Column(
@ -180,6 +183,23 @@ class Setup2FAQRPage extends BasePage {
),
SizedBox(height: 8),
StandardListSeparator(),
SizedBox(height: 16),
GestureDetector(
onTap: () => Navigator.of(context).pushNamed(Routes.webViewPage,
arguments: [cake2FAHowToUseTitle, cake2FAHowToUseUrl]),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(cake2FAHowToUseTitle,
style: TextStyle(
decoration: TextDecoration.underline,
fontSize: 16,
fontWeight: FontWeight.w700,
)),
Icon(Icons.info_outline,size: 20)
],
)),
Spacer(),
PrimaryButton(
onPressed: () {