mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-07-10 04:21:21 +02:00
mobile: fix two-factor ui
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2026-06-16 13:14+0500\n"
|
||||
"POT-Creation-Date: 2026-06-16 13:15+0500\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -671,8 +671,8 @@ msgid "About"
|
||||
msgstr "About"
|
||||
|
||||
#: src/strings.ts:2827
|
||||
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."
|
||||
@@ -2821,25 +2821,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"
|
||||
@@ -2860,6 +2856,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"
|
||||
@@ -4989,8 +4989,8 @@ msgid "Payment method"
|
||||
msgstr "Payment method"
|
||||
|
||||
#: src/strings.ts:2823
|
||||
msgid "Payment summary"
|
||||
msgstr "Payment summary"
|
||||
msgid "Payment Summary"
|
||||
msgstr "Payment Summary"
|
||||
|
||||
#: src/strings.ts:788
|
||||
msgid "PDF is password protected"
|
||||
@@ -5143,6 +5143,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:2851
|
||||
msgid "Please provide a valid multi factor authentication code."
|
||||
msgstr "Please provide a valid multi factor authentication code."
|
||||
|
||||
#: src/strings.ts:2849
|
||||
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"
|
||||
@@ -5301,14 +5309,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. "
|
||||
@@ -5521,6 +5529,10 @@ msgstr "Recommended by Privacy Guides"
|
||||
msgid "Recover your account"
|
||||
msgstr "Recover your account"
|
||||
|
||||
#: src/strings.ts:2847
|
||||
msgid "Recovery Code"
|
||||
msgstr "Recovery Code"
|
||||
|
||||
#: src/strings.ts:1021
|
||||
msgid "Recovery codes copied!"
|
||||
msgstr "Recovery codes copied!"
|
||||
@@ -6648,8 +6660,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"
|
||||
@@ -6902,14 +6914,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"
|
||||
@@ -7769,8 +7781,8 @@ msgid "What went wrong?"
|
||||
msgstr "What went wrong?"
|
||||
|
||||
#: src/strings.ts:2822
|
||||
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?"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2026-06-16 13:14+0500\n"
|
||||
"POT-Creation-Date: 2026-06-16 13:15+0500\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -671,7 +671,7 @@ msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2827
|
||||
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
|
||||
@@ -2810,25 +2810,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 ""
|
||||
@@ -2849,6 +2845,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 ""
|
||||
@@ -4963,7 +4963,7 @@ msgid "Payment method"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2823
|
||||
msgid "Payment summary"
|
||||
msgid "Payment Summary"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:788
|
||||
@@ -5117,6 +5117,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:2851
|
||||
msgid "Please provide a valid multi factor authentication code."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2849
|
||||
msgid "Please provide a valid multi factor authentication recovery code."
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:1786
|
||||
msgid "Please refer to the"
|
||||
msgstr ""
|
||||
@@ -5275,14 +5283,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 ""
|
||||
@@ -5495,6 +5503,10 @@ msgstr ""
|
||||
msgid "Recover your account"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2847
|
||||
msgid "Recovery Code"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:1021
|
||||
msgid "Recovery codes copied!"
|
||||
msgstr ""
|
||||
@@ -6614,7 +6626,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
|
||||
@@ -6861,12 +6873,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
|
||||
@@ -7719,7 +7731,7 @@ msgid "What went wrong?"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2822
|
||||
msgid "What's included"
|
||||
msgid "What's Included"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2541
|
||||
|
||||
@@ -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`,
|
||||
@@ -2819,12 +2819,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`
|
||||
},
|
||||
@@ -2843,5 +2843,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