mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
mobile: fix two-factor ui
This commit is contained in:
committed by
Abdullah Atta
parent
fdb5f3b035
commit
643cbde114
@@ -80,7 +80,11 @@ const TwoFactorVerification = ({
|
||||
const onNext = async () => {
|
||||
if (!code.current || code.current.length < 6) {
|
||||
setError(
|
||||
new Error("Please provide a valid multi-factor authentication code.")
|
||||
new Error(
|
||||
currentMethod.method === "recoveryCode"
|
||||
? strings.provideValidMultiFactorAuthRecoveryCode()
|
||||
: strings.provideValidMultiFactorAuthCode()
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -214,7 +218,11 @@ const TwoFactorVerification = ({
|
||||
marginBottom: Spacing.LEVEL_1
|
||||
}}
|
||||
>
|
||||
{currentMethod.method ? strings["2fa"]() : strings.select2faMethod()}
|
||||
{currentMethod.method === "recoveryCode"
|
||||
? strings.recoveryCodeTitle()
|
||||
: currentMethod.method
|
||||
? strings["2fa"]()
|
||||
: strings.select2faMethod()}
|
||||
</Heading>
|
||||
<Paragraph
|
||||
style={{
|
||||
@@ -234,10 +242,6 @@ const TwoFactorVerification = ({
|
||||
<View
|
||||
style={{
|
||||
borderRadius: Radius.S,
|
||||
borderWidth: 1,
|
||||
borderColor: colors.primary.border,
|
||||
paddingVertical: Spacing.LEVEL_4,
|
||||
paddingHorizontal: Spacing.LEVEL_3,
|
||||
width: "100%",
|
||||
gap: Spacing.LEVEL_4
|
||||
}}
|
||||
@@ -343,7 +347,8 @@ const TwoFactorVerification = ({
|
||||
activeOpacity={0.8}
|
||||
style={{
|
||||
alignSelf: "center",
|
||||
paddingVertical: 0
|
||||
paddingVertical: 0,
|
||||
marginTop: Spacing.LEVEL_3
|
||||
}}
|
||||
>
|
||||
<Paragraph fontSize="SM" color={colors.secondary.paragraph}>
|
||||
|
||||
@@ -196,7 +196,7 @@ export const BuyPlan = (props: {
|
||||
</Paragraph>
|
||||
</View>
|
||||
|
||||
<Heading color={colors.primary.paragraph} fontSize="SM">
|
||||
<Heading color={colors.primary.accent} fontSize="SM">
|
||||
{hasTrialOffer
|
||||
? "Free"
|
||||
: pricingPlans.getStandardPrice(
|
||||
@@ -238,7 +238,7 @@ export const BuyPlan = (props: {
|
||||
{dayjs()
|
||||
.add(billingDuration?.duration || 0, "day")
|
||||
.format("DD MMMM,YYYY")}{" "}
|
||||
*{" "}
|
||||
•{" "}
|
||||
{isAnnual
|
||||
? strings.billingType.annual()
|
||||
: is5YearPlanSelected
|
||||
@@ -343,7 +343,7 @@ export const BuyPlan = (props: {
|
||||
color: colors.primary.accent
|
||||
}}
|
||||
onPress={() => {
|
||||
openLinkInBrowser("https://notesnook.com/privacy");
|
||||
openLinkInBrowser("https://notesnook.com/tos");
|
||||
}}
|
||||
>
|
||||
{strings.subTerms[1]()}
|
||||
@@ -354,7 +354,7 @@ export const BuyPlan = (props: {
|
||||
color: colors.primary.accent
|
||||
}}
|
||||
onPress={() => {
|
||||
openLinkInBrowser("https://notesnook.com/tos");
|
||||
openLinkInBrowser("https://notesnook.com/privacy");
|
||||
}}
|
||||
>
|
||||
{strings.subTerms[3]()}
|
||||
|
||||
@@ -244,7 +244,10 @@ const PinInput = ({
|
||||
rowGap: Spacing.LEVEL_1,
|
||||
columnGap: Spacing.LEVEL_1,
|
||||
borderWidth: 1,
|
||||
borderColor: colors.primary.border,
|
||||
borderColor:
|
||||
focusedIndex !== null
|
||||
? colors.selected.accent
|
||||
: colors.primary.border,
|
||||
borderRadius: Radius.S,
|
||||
paddingVertical: Spacing.LEVEL_3,
|
||||
paddingHorizontal: Spacing.LEVEL_2
|
||||
|
||||
@@ -671,8 +671,8 @@ msgid "About"
|
||||
msgstr "About"
|
||||
|
||||
#: src/strings.ts:2831
|
||||
msgid "Access on all devices"
|
||||
msgstr "Access on all devices"
|
||||
msgid "Access on all your devices"
|
||||
msgstr "Access on all your devices"
|
||||
|
||||
#: src/strings.ts:1040
|
||||
msgid "Account"
|
||||
@@ -1385,8 +1385,8 @@ msgid "Cancel"
|
||||
msgstr "Cancel"
|
||||
|
||||
#: src/strings.ts:2606
|
||||
msgid "Cancel anytime, subscription auto-renews."
|
||||
msgstr "Cancel anytime, subscription auto-renews."
|
||||
msgid "Cancel anytime, Subscription auto-renews."
|
||||
msgstr "Cancel anytime, Subscription auto-renews."
|
||||
|
||||
#: src/strings.ts:2568
|
||||
msgid "Cancel anytime."
|
||||
@@ -2825,25 +2825,21 @@ msgid "Enter recovery code"
|
||||
msgstr "Enter recovery code"
|
||||
|
||||
#: src/strings.ts:119
|
||||
msgid "Enter the 6 digit code from your authenticator app to continue logging in"
|
||||
msgstr "Enter the 6 digit code from your authenticator app to continue logging in"
|
||||
msgid "Enter the 6 digit code from your authenticator app to continue logging in."
|
||||
msgstr "Enter the 6 digit code from your authenticator app to continue logging in."
|
||||
|
||||
#: src/strings.ts:115
|
||||
msgid "Enter the 6 digit code sent to your email to continue logging in"
|
||||
msgstr "Enter the 6 digit code sent to your email to continue logging in"
|
||||
msgid "Enter the 6 digit code sent to your email to continue logging in."
|
||||
msgstr "Enter the 6 digit code sent to your email to continue logging in."
|
||||
|
||||
#: src/strings.ts:117
|
||||
msgid "Enter the 6 digit code sent to your phone number to continue logging in"
|
||||
msgstr "Enter the 6 digit code sent to your phone number to continue logging in"
|
||||
msgid "Enter the 6 digit code sent to your phone number to continue logging in."
|
||||
msgstr "Enter the 6 digit code sent to your phone number to continue logging in."
|
||||
|
||||
#: src/strings.ts:2465
|
||||
msgid "Enter the gift code to redeem your subscription."
|
||||
msgstr "Enter the gift code to redeem your subscription."
|
||||
|
||||
#: src/strings.ts:120
|
||||
msgid "Enter the recovery code to continue logging in"
|
||||
msgstr "Enter the recovery code to continue logging in"
|
||||
|
||||
#: src/strings.ts:2653
|
||||
msgid "Enter title"
|
||||
msgstr "Enter title"
|
||||
@@ -2864,6 +2860,10 @@ msgstr "Enter your PGP private key"
|
||||
msgid "Enter your PGP public key"
|
||||
msgstr "Enter your PGP public key"
|
||||
|
||||
#: src/strings.ts:120
|
||||
msgid "Enter your recovery code."
|
||||
msgstr "Enter your recovery code."
|
||||
|
||||
#: src/strings.ts:2120
|
||||
msgid "Enter your username"
|
||||
msgstr "Enter your username"
|
||||
@@ -4993,8 +4993,8 @@ msgid "Payment method"
|
||||
msgstr "Payment method"
|
||||
|
||||
#: src/strings.ts:2827
|
||||
msgid "Payment summary"
|
||||
msgstr "Payment summary"
|
||||
msgid "Payment Summary"
|
||||
msgstr "Payment Summary"
|
||||
|
||||
#: src/strings.ts:788
|
||||
msgid "PDF is password protected"
|
||||
@@ -5147,6 +5147,14 @@ msgstr "Please make sure you have saved the recovery key. Tap one more time to c
|
||||
msgid "Please note that we will respond to your issue on the given link. We recommend that you save it."
|
||||
msgstr "Please note that we will respond to your issue on the given link. We recommend that you save it."
|
||||
|
||||
#: src/strings.ts:2855
|
||||
msgid "Please provide a valid multi factor authentication code."
|
||||
msgstr "Please provide a valid multi factor authentication code."
|
||||
|
||||
#: src/strings.ts:2853
|
||||
msgid "Please provide a valid multi factor authentication recovery code."
|
||||
msgstr "Please provide a valid multi factor authentication recovery code."
|
||||
|
||||
#: src/strings.ts:1786
|
||||
msgid "Please refer to the"
|
||||
msgstr "Please refer to the"
|
||||
@@ -5305,14 +5313,14 @@ msgstr "Privacy for everyone"
|
||||
msgid "Privacy mode"
|
||||
msgstr "Privacy mode"
|
||||
|
||||
#: src/strings.ts:2609
|
||||
msgid "privacy policy"
|
||||
msgstr "privacy policy"
|
||||
|
||||
#: src/strings.ts:1301
|
||||
msgid "Privacy policy"
|
||||
msgstr "Privacy policy"
|
||||
|
||||
#: src/strings.ts:2611
|
||||
msgid "Privacy Policy."
|
||||
msgstr "Privacy Policy."
|
||||
|
||||
#: src/strings.ts:104
|
||||
msgid "Privacy Policy. "
|
||||
msgstr "Privacy Policy. "
|
||||
@@ -5525,6 +5533,10 @@ msgstr "Recommended by Privacy Guides"
|
||||
msgid "Recover your account"
|
||||
msgstr "Recover your account"
|
||||
|
||||
#: src/strings.ts:2851
|
||||
msgid "Recovery Code"
|
||||
msgstr "Recovery Code"
|
||||
|
||||
#: src/strings.ts:1021
|
||||
msgid "Recovery codes copied!"
|
||||
msgstr "Recovery codes copied!"
|
||||
@@ -6377,7 +6389,7 @@ msgstr "Set the interval to create a partial backup (without attachments) automa
|
||||
msgid "Set your name"
|
||||
msgstr "Set your name"
|
||||
|
||||
#: src/strings.ts:2845
|
||||
#: src/strings.ts:2849
|
||||
msgid "Setting up your account..."
|
||||
msgstr "Setting up your account..."
|
||||
|
||||
@@ -6652,8 +6664,8 @@ msgid "Subscribe"
|
||||
msgstr "Subscribe"
|
||||
|
||||
#: src/strings.ts:2604
|
||||
msgid "Subscribe and start free trial"
|
||||
msgstr "Subscribe and start free trial"
|
||||
msgid "Subscribe & Start Your Free Trial"
|
||||
msgstr "Subscribe & Start Your Free Trial"
|
||||
|
||||
#: src/strings.ts:1041
|
||||
msgid "Subscribe to Pro"
|
||||
@@ -6906,14 +6918,14 @@ msgstr "Tell us what happened"
|
||||
msgid "Terms of service"
|
||||
msgstr "Terms of service"
|
||||
|
||||
#: src/strings.ts:2609
|
||||
msgid "Terms of Service"
|
||||
msgstr "Terms of Service"
|
||||
|
||||
#: src/strings.ts:102
|
||||
msgid "Terms of Service "
|
||||
msgstr "Terms of Service "
|
||||
|
||||
#: src/strings.ts:2611
|
||||
msgid "terms of use."
|
||||
msgstr "terms of use."
|
||||
|
||||
#: src/strings.ts:1643
|
||||
msgid "Test connection"
|
||||
msgstr "Test connection"
|
||||
@@ -7777,8 +7789,8 @@ msgid "What went wrong?"
|
||||
msgstr "What went wrong?"
|
||||
|
||||
#: src/strings.ts:2826
|
||||
msgid "What's included"
|
||||
msgstr "What's included"
|
||||
msgid "What's Included"
|
||||
msgstr "What's Included"
|
||||
|
||||
#: src/strings.ts:2541
|
||||
msgid "Why do you need my credit card details for a free trial?"
|
||||
@@ -8035,7 +8047,7 @@ msgstr "Your account email will be changed without affecting your subscription o
|
||||
msgid "Your account has been recovered."
|
||||
msgstr "Your account has been recovered."
|
||||
|
||||
#: src/strings.ts:2846
|
||||
#: src/strings.ts:2850
|
||||
msgid "Your account is almost ready, please wait."
|
||||
msgstr "Your account is almost ready, please wait."
|
||||
|
||||
|
||||
@@ -671,7 +671,7 @@ msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2831
|
||||
msgid "Access on all devices"
|
||||
msgid "Access on all your devices"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:1040
|
||||
@@ -1385,7 +1385,7 @@ msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2606
|
||||
msgid "Cancel anytime, subscription auto-renews."
|
||||
msgid "Cancel anytime, Subscription auto-renews."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2568
|
||||
@@ -2814,25 +2814,21 @@ msgid "Enter recovery code"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:119
|
||||
msgid "Enter the 6 digit code from your authenticator app to continue logging in"
|
||||
msgid "Enter the 6 digit code from your authenticator app to continue logging in."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:115
|
||||
msgid "Enter the 6 digit code sent to your email to continue logging in"
|
||||
msgid "Enter the 6 digit code sent to your email to continue logging in."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:117
|
||||
msgid "Enter the 6 digit code sent to your phone number to continue logging in"
|
||||
msgid "Enter the 6 digit code sent to your phone number to continue logging in."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2465
|
||||
msgid "Enter the gift code to redeem your subscription."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:120
|
||||
msgid "Enter the recovery code to continue logging in"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2653
|
||||
msgid "Enter title"
|
||||
msgstr ""
|
||||
@@ -2853,6 +2849,10 @@ msgstr ""
|
||||
msgid "Enter your PGP public key"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:120
|
||||
msgid "Enter your recovery code."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2120
|
||||
msgid "Enter your username"
|
||||
msgstr ""
|
||||
@@ -4967,7 +4967,7 @@ msgid "Payment method"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2827
|
||||
msgid "Payment summary"
|
||||
msgid "Payment Summary"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:788
|
||||
@@ -5121,6 +5121,14 @@ msgstr ""
|
||||
msgid "Please note that we will respond to your issue on the given link. We recommend that you save it."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2855
|
||||
msgid "Please provide a valid multi factor authentication code."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2853
|
||||
msgid "Please provide a valid multi factor authentication recovery code."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:1786
|
||||
msgid "Please refer to the"
|
||||
msgstr ""
|
||||
@@ -5279,14 +5287,14 @@ msgstr ""
|
||||
msgid "Privacy mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2609
|
||||
msgid "privacy policy"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:1301
|
||||
msgid "Privacy policy"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2611
|
||||
msgid "Privacy Policy."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:104
|
||||
msgid "Privacy Policy. "
|
||||
msgstr ""
|
||||
@@ -5499,6 +5507,10 @@ msgstr ""
|
||||
msgid "Recover your account"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2851
|
||||
msgid "Recovery Code"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:1021
|
||||
msgid "Recovery codes copied!"
|
||||
msgstr ""
|
||||
@@ -6351,7 +6363,7 @@ msgstr ""
|
||||
msgid "Set your name"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2845
|
||||
#: src/strings.ts:2849
|
||||
msgid "Setting up your account..."
|
||||
msgstr ""
|
||||
|
||||
@@ -6618,7 +6630,7 @@ msgid "Subscribe"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2604
|
||||
msgid "Subscribe and start free trial"
|
||||
msgid "Subscribe & Start Your Free Trial"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:1041
|
||||
@@ -6865,12 +6877,12 @@ msgstr ""
|
||||
msgid "Terms of service"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:102
|
||||
msgid "Terms of Service "
|
||||
#: src/strings.ts:2609
|
||||
msgid "Terms of Service"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2611
|
||||
msgid "terms of use."
|
||||
#: src/strings.ts:102
|
||||
msgid "Terms of Service "
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:1643
|
||||
@@ -7727,7 +7739,7 @@ msgid "What went wrong?"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2826
|
||||
msgid "What's included"
|
||||
msgid "What's Included"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2541
|
||||
@@ -7974,7 +7986,7 @@ msgstr ""
|
||||
msgid "Your account has been recovered."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2846
|
||||
#: src/strings.ts:2850
|
||||
msgid "Your account is almost ready, please wait."
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -112,12 +112,12 @@ export const strings = {
|
||||
select2faCodeHelpText: () => t`Select how you would like to recieve the code`,
|
||||
"2faCodeHelpText": {
|
||||
email: () =>
|
||||
t`Enter the 6 digit code sent to your email to continue logging in`,
|
||||
t`Enter the 6 digit code sent to your email to continue logging in.`,
|
||||
sms: () =>
|
||||
t`Enter the 6 digit code sent to your phone number to continue logging in`,
|
||||
t`Enter the 6 digit code sent to your phone number to continue logging in.`,
|
||||
app: () =>
|
||||
t`Enter the 6 digit code from your authenticator app to continue logging in`,
|
||||
recoveryCode: () => t`Enter the recovery code to continue logging in`
|
||||
t`Enter the 6 digit code from your authenticator app to continue logging in.`,
|
||||
recoveryCode: () => t`Enter your recovery code.`
|
||||
},
|
||||
"2faCodeSecondaryMethodText": {
|
||||
email: () => t`I don't have access to email`,
|
||||
@@ -2601,14 +2601,14 @@ Use this if changes from other devices are not appearing on this device. This wi
|
||||
],
|
||||
purchase: () => t`Purchase`,
|
||||
subscribe: () => t`Subscribe`,
|
||||
subscribeAndStartTrial: () => t`Subscribe and start free trial`,
|
||||
subscribeAndStartTrial: () => t`Subscribe & Start Your Free Trial`,
|
||||
oneTimePurchase: () => t`This is a one time purchase, no subscription.`,
|
||||
cancelAnytimeAlt: () => t`Cancel anytime, subscription auto-renews.`,
|
||||
cancelAnytimeAlt: () => t`Cancel anytime, Subscription auto-renews.`,
|
||||
subTerms: [
|
||||
() => t`By joining you agree to our`,
|
||||
() => t`privacy policy`,
|
||||
() => t`Terms of Service`,
|
||||
() => t`and`,
|
||||
() => t`terms of use.`
|
||||
() => t`Privacy Policy.`
|
||||
],
|
||||
bestValue: () => t`Best value`,
|
||||
planLimits: () => t`Plan limits`,
|
||||
@@ -2823,12 +2823,12 @@ Continue without attachments?`,
|
||||
monthly: () => t`Billed monthly`,
|
||||
oneTime: () => t`One time purchase`
|
||||
},
|
||||
whatsIncluded: () => t`What's included`,
|
||||
paymentSummary: () => t`Payment summary`,
|
||||
whatsIncluded: () => t`What's Included`,
|
||||
paymentSummary: () => t`Payment Summary`,
|
||||
planWhatsIncluded: {
|
||||
unlimitedNotes: () => t`Unlimited notes and attachments`,
|
||||
endToEnd: () => t`End-to-end encryption (XChaCha20)`,
|
||||
allDevices: () => t`Access on all devices`,
|
||||
allDevices: () => t`Access on all your devices`,
|
||||
freeTrial: (days: number) => t`Free ${days} days trial, cancel anytime`,
|
||||
remind: () => t`Remind before your trial ends`
|
||||
},
|
||||
@@ -2847,5 +2847,10 @@ Continue without attachments?`,
|
||||
button: () => t`Add Your First Note`
|
||||
},
|
||||
settingUpYourAccount: () => t`Setting up your account...`,
|
||||
accountAlmostReady: () => t`Your account is almost ready, please wait.`
|
||||
accountAlmostReady: () => t`Your account is almost ready, please wait.`,
|
||||
recoveryCodeTitle: () => t`Recovery Code`,
|
||||
provideValidMultiFactorAuthRecoveryCode: () =>
|
||||
t`Please provide a valid multi factor authentication recovery code.`,
|
||||
provideValidMultiFactorAuthCode: () =>
|
||||
t`Please provide a valid multi factor authentication code.`
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user