mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
fix text
This commit is contained in:
parent
b87c11bbe4
commit
7fe1091b4c
4 changed files with 57 additions and 43 deletions
|
@ -30,9 +30,6 @@ class WarningPage extends BasePage {
|
||||||
Widget body(BuildContext context) {
|
Widget body(BuildContext context) {
|
||||||
final image = currentTheme.type == ThemeType.dark ? imageDark : imageLight;
|
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(
|
return WillPopScope(
|
||||||
onWillPop: () async => false,
|
onWillPop: () async => false,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -44,16 +41,19 @@ class WarningPage extends BasePage {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ConstrainedBox(
|
Expanded(
|
||||||
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3),
|
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3),
|
||||||
child: AspectRatio(aspectRatio: 1, child: image),
|
child: AspectRatio(aspectRatio: 1, child: image),
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(10),
|
||||||
child: Text(
|
child: Text(
|
||||||
isPreSeedPage
|
isPreSeedPage
|
||||||
? S.of(context).pre_seed_description(seedPhraseLength.toString())
|
? S.of(context).pre_seed_description(seedPhraseLength.toString())
|
||||||
: text,
|
: S.of(context).setup_warning_2fa_text,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
@ -62,11 +62,14 @@ class WarningPage extends BasePage {
|
||||||
? Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor
|
? Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor
|
||||||
: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
|
: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
PrimaryButton(
|
PrimaryButton(
|
||||||
onPressed: () => isPreSeedPage
|
onPressed: () => isPreSeedPage
|
||||||
? Navigator.of(context).popAndPushNamed(Routes.seed, arguments: true)
|
? Navigator.of(context).popAndPushNamed(Routes.seed, arguments: true)
|
||||||
: Navigator.of(context).popAndPushNamed(Routes.setup_2faPage),
|
: 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,
|
color: Theme.of(context).primaryColor,
|
||||||
textColor: Colors.white)
|
textColor: Colors.white)
|
||||||
],
|
],
|
||||||
|
|
|
@ -14,23 +14,27 @@ class Setup2FAPage extends BasePage {
|
||||||
final Setup2FAViewModel setup2FAViewModel;
|
final Setup2FAViewModel setup2FAViewModel;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get title => S.current.setup_2fa;
|
String get title => 'CAKE 2FA';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget body(BuildContext context) {
|
Widget body(BuildContext context) {
|
||||||
final cake2FAGuideTitle = 'Cake 2FA Guide';
|
final cake2FAGuideTitle = 'Cake 2FA Guide';
|
||||||
final cake2FAGuideUri =
|
final cake2FAGuideUri =
|
||||||
Uri.parse('https://guides.cakewallet.com/docs/advanced-features/authentication');
|
Uri.parse('https://guides.cakewallet.com/docs/advanced-features/authentication');
|
||||||
return SingleChildScrollView(
|
return Column(
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
ConstrainedBox(
|
Expanded(
|
||||||
|
flex: 2,
|
||||||
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3),
|
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3),
|
||||||
child:
|
child:
|
||||||
AspectRatio(aspectRatio: 1, child: Image.asset('assets/images/setup_2fa_img.png')),
|
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),
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||||
child: Text(
|
child: Text(
|
||||||
S.current.setup_2fa_text,
|
S.current.setup_2fa_text,
|
||||||
|
@ -43,7 +47,10 @@ class Setup2FAPage extends BasePage {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 56),
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
SettingsCellWithArrow(
|
SettingsCellWithArrow(
|
||||||
title: S.current.setup_totp_recommended,
|
title: S.current.setup_totp_recommended,
|
||||||
handler: (_) {
|
handler: (_) {
|
||||||
|
@ -57,6 +64,8 @@ class Setup2FAPage extends BasePage {
|
||||||
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
|
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Setup2FAQRPage extends BasePage {
|
||||||
children: [
|
children: [
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text(
|
Text(
|
||||||
S.current.add_secret_code,
|
S.current.scan_qr_on_device,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
|
|
|
@ -626,9 +626,11 @@
|
||||||
"totp_verification_success": "Verification Successful!",
|
"totp_verification_success": "Verification Successful!",
|
||||||
"totp_2fa_failure": "Incorrect code. Please try a different code or generate a new secret key. Use a compatible 2FA app that supports 8-digit codes and SHA512.",
|
"totp_2fa_failure": "Incorrect code. Please try a different code or generate a new secret key. Use a compatible 2FA app that supports 8-digit codes and SHA512.",
|
||||||
"enter_totp_code": "Please enter the TOTP Code.",
|
"enter_totp_code": "Please enter the TOTP Code.",
|
||||||
"add_secret_code": "Add this secret code to another device",
|
"scan_qr_on_device": "Scan this QR code on another device",
|
||||||
|
"add_secret_code": "Or, add this secret code to an authenticator app",
|
||||||
"totp_secret_code": "TOTP Secret Code",
|
"totp_secret_code": "TOTP Secret Code",
|
||||||
"setup_2fa_text": "Cake 2FA is NOT as secure as cold storage. 2FA protects against basic types of attacks, such as your friend providing your fingerprint while you are sleeping.\n\n Cake 2FA does NOT protect against a compromised device by a sophisticated attacker.\n\n If you lose access to your 2FA codes, YOU WILL LOSE ACCESS TO THIS WALLET. You will need to restore your wallet from mnemonic seed. YOU MUST THEREFORE BACK UP YOUR MNEMONIC SEEDS! Further, someone with access to your mnemonic seed(s) will be able to steal your funds, bypassing Cake 2FA.\n\n Cake support staff will be unable to assist you if you lose access to your mnemonic seed, since Cake is a noncustodial wallet.",
|
"setup_2fa_text": "Cake 2FA works through TOTP as the second authentication factor.\n\nCake 2FA's TOTP requires SHA-512 and 8 digit support; this provides increased security. More information and supported apps can be found in the guide here.",
|
||||||
|
"setup_warning_2fa_text": "Cake 2FA is a second authentication for certain actions in the wallet. It is NOT as secure as cold storage.\n If you lose access to your 2FA app or passkeys, you WILL lose access to this wallet.\n You will need to restore your wallet from the mnemonic seed.\n 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.",
|
||||||
"setup_totp_recommended": "Set up TOTP (Recommended)",
|
"setup_totp_recommended": "Set up TOTP (Recommended)",
|
||||||
"disable_buy": "Disable buy action",
|
"disable_buy": "Disable buy action",
|
||||||
"disable_sell": "Disable sell action",
|
"disable_sell": "Disable sell action",
|
||||||
|
|
Loading…
Reference in a new issue