mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-07-10 04:21:21 +02:00
mobile: fix 2fa method selection ui
This commit is contained in:
@@ -316,48 +316,56 @@ const TwoFactorVerification = ({
|
||||
/>
|
||||
</View>
|
||||
|
||||
{currentMethod.method === "sms" ||
|
||||
currentMethod.method === "email" ? (
|
||||
<Button
|
||||
onPress={onSendCode}
|
||||
type={"plain"}
|
||||
disabled={parseInt(`${seconds}`) !== 0}
|
||||
title={
|
||||
sending
|
||||
? ""
|
||||
: `${
|
||||
seconds
|
||||
? strings.resend2faCode(`${seconds}`)
|
||||
: strings.resendCode()
|
||||
}`
|
||||
}
|
||||
loading={sending}
|
||||
fontSize={AppFontSize.sm}
|
||||
fontFamily="REGULAR"
|
||||
<View
|
||||
style={{
|
||||
gap: Spacing.LEVEL_1,
|
||||
marginTop: -Spacing.LEVEL_0
|
||||
}}
|
||||
>
|
||||
{currentMethod.method === "sms" ||
|
||||
currentMethod.method === "email" ? (
|
||||
<Button
|
||||
onPress={onSendCode}
|
||||
type={"plain"}
|
||||
disabled={parseInt(`${seconds}`) !== 0}
|
||||
title={
|
||||
sending
|
||||
? ""
|
||||
: `${
|
||||
seconds
|
||||
? strings.resend2faCode(`${seconds}`)
|
||||
: strings.resendCode()
|
||||
}`
|
||||
}
|
||||
loading={sending}
|
||||
fontSize={AppFontSize.sm}
|
||||
fontFamily="REGULAR"
|
||||
style={{
|
||||
paddingVertical: 0,
|
||||
alignSelf: "flex-start",
|
||||
paddingHorizontal: 0
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
<TouchableOpacity
|
||||
onPress={onRequestSecondaryMethod}
|
||||
activeOpacity={0.8}
|
||||
style={{
|
||||
paddingVertical: 0,
|
||||
alignSelf: "flex-start",
|
||||
paddingHorizontal: 0
|
||||
alignSelf: "flex-start"
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
>
|
||||
<Paragraph
|
||||
fontFamily="SEMI_BOLD"
|
||||
fontSize="SM"
|
||||
color={colors.primary.accent}
|
||||
>
|
||||
{strings["2faCodeSecondaryMethodText"][
|
||||
currentMethod.method as keyof (typeof strings)["2faCodeSecondaryMethodText"]
|
||||
]()}
|
||||
</Paragraph>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<TouchableOpacity
|
||||
onPress={onRequestSecondaryMethod}
|
||||
activeOpacity={0.8}
|
||||
style={{
|
||||
alignSelf: "center",
|
||||
paddingVertical: 0,
|
||||
marginTop: Spacing.LEVEL_3
|
||||
}}
|
||||
>
|
||||
<Paragraph fontSize="SM" color={colors.secondary.paragraph}>
|
||||
{strings["2faCodeSecondaryMethodText"][
|
||||
currentMethod.method as keyof (typeof strings)["2faCodeSecondaryMethodText"]
|
||||
]()}
|
||||
</Paragraph>
|
||||
</TouchableOpacity>
|
||||
</>
|
||||
) : (
|
||||
<View
|
||||
|
||||
@@ -5989,8 +5989,8 @@ msgid "Report issue"
|
||||
msgstr "Report issue"
|
||||
|
||||
#: src/strings.ts:128
|
||||
msgid "Resend code in ({seconds})"
|
||||
msgstr "Resend code in ({seconds})"
|
||||
msgid "Resend code in {seconds}s"
|
||||
msgstr "Resend code in {seconds}s"
|
||||
|
||||
#. placeholder {0}: seconds ? ` in ${seconds}` : ""
|
||||
#: src/strings.ts:679
|
||||
|
||||
@@ -5963,7 +5963,7 @@ msgid "Report issue"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:128
|
||||
msgid "Resend code in ({seconds})"
|
||||
msgid "Resend code in {seconds}s"
|
||||
msgstr ""
|
||||
|
||||
#. placeholder {0}: seconds ? ` in ${seconds}` : ""
|
||||
|
||||
@@ -125,7 +125,7 @@ export const strings = {
|
||||
app: () => t`I don't have access to authenticator app`,
|
||||
recoveryCode: () => t`I don't have recovery codes`
|
||||
},
|
||||
resend2faCode: (seconds: string) => t`Resend code in (${seconds})`,
|
||||
resend2faCode: (seconds: string) => t`Resend code in ${seconds}s`,
|
||||
sendCode: () => t`Send code`,
|
||||
sendCodeSms: () => t`Send code via SMS`,
|
||||
sendCodeEmail: () => t`Send code via email`,
|
||||
|
||||
Reference in New Issue
Block a user