mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-25 05:58:42 +01:00
fix text
This commit is contained in:
@@ -30,9 +30,6 @@ class WarningPage extends BasePage {
|
||||
Widget body(BuildContext context) {
|
||||
final image = currentTheme.type == ThemeType.dark ? imageDark : imageLight;
|
||||
|
||||
final text =
|
||||
"Cake 2FA is a second authentication for certain actions in the wallet. It is NOT as secure as cold storage. If you lose access to your 2FA app or passkeys, you WILL lose access to this wallet. You will need to restore your wallet from the mnemonic seed. Cake support will be unable to assist you if you lose access to your 2FA or mnemonic seeds. Before using Cake 2FA, we recommend reading through the guide here.";
|
||||
|
||||
return WillPopScope(
|
||||
onWillPop: () async => false,
|
||||
child: Container(
|
||||
@@ -44,29 +41,35 @@ class WarningPage extends BasePage {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3),
|
||||
child: AspectRatio(aspectRatio: 1, child: image),
|
||||
Expanded(
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3),
|
||||
child: AspectRatio(aspectRatio: 1, child: image),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Text(
|
||||
isPreSeedPage
|
||||
? S.of(context).pre_seed_description(seedPhraseLength.toString())
|
||||
: text,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: isPreSeedPage
|
||||
? Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Text(
|
||||
isPreSeedPage
|
||||
? S.of(context).pre_seed_description(seedPhraseLength.toString())
|
||||
: S.of(context).setup_warning_2fa_text,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: isPreSeedPage
|
||||
? Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
|
||||
),
|
||||
),
|
||||
PrimaryButton(
|
||||
onPressed: () => isPreSeedPage
|
||||
? Navigator.of(context).popAndPushNamed(Routes.seed, arguments: true)
|
||||
: Navigator.of(context).popAndPushNamed(Routes.setup_2faPage),
|
||||
text: isPreSeedPage ? S.of(context).pre_seed_button_text : 'Neeeeeeee',
|
||||
text: isPreSeedPage
|
||||
? S.of(context).pre_seed_button_text
|
||||
: S.of(context).understand,
|
||||
color: Theme.of(context).primaryColor,
|
||||
textColor: Colors.white)
|
||||
],
|
||||
|
||||
@@ -14,23 +14,27 @@ class Setup2FAPage extends BasePage {
|
||||
final Setup2FAViewModel setup2FAViewModel;
|
||||
|
||||
@override
|
||||
String get title => S.current.setup_2fa;
|
||||
String get title => 'CAKE 2FA';
|
||||
|
||||
@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.center,
|
||||
children: [
|
||||
ConstrainedBox(
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3),
|
||||
child:
|
||||
AspectRatio(aspectRatio: 1, child: Image.asset('assets/images/setup_2fa_img.png')),
|
||||
),
|
||||
Padding(
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
child: Text(
|
||||
S.current.setup_2fa_text,
|
||||
@@ -43,20 +47,25 @@ class Setup2FAPage extends BasePage {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 56),
|
||||
SettingsCellWithArrow(
|
||||
title: S.current.setup_totp_recommended,
|
||||
handler: (_) {
|
||||
setup2FAViewModel.generateSecretKey();
|
||||
return Navigator.of(context).pushReplacementNamed(Routes.setup_2faQRPage);
|
||||
},
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
SettingsCellWithArrow(
|
||||
title: S.current.setup_totp_recommended,
|
||||
handler: (_) {
|
||||
setup2FAViewModel.generateSecretKey();
|
||||
return Navigator.of(context).pushReplacementNamed(Routes.setup_2faQRPage);
|
||||
},
|
||||
),
|
||||
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
|
||||
SettingsCellWithArrow(
|
||||
title: cake2FAGuideTitle, handler: (_) => _launchUrl(cake2FAGuideUri)),
|
||||
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
|
||||
],
|
||||
),
|
||||
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
|
||||
SettingsCellWithArrow(
|
||||
title: cake2FAGuideTitle, handler: (_) => _launchUrl(cake2FAGuideUri)),
|
||||
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class Setup2FAQRPage extends BasePage {
|
||||
children: [
|
||||
Spacer(),
|
||||
Text(
|
||||
S.current.add_secret_code,
|
||||
S.current.scan_qr_on_device,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
|
||||
Reference in New Issue
Block a user