A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: add back button in recovery forms (#9676)
01zulfic8e8935b3413
diff --git a/apps/web/src/views/recovery.tsx b/apps/web/src/views/recovery.tsxindex c92605f62..0eb8d1284 100644--- a/apps/web/src/views/recovery.tsx+++ b/apps/web/src/views/recovery.tsx@@ -43,6 +43,7 @@ type NewPasswordFormData = {userResetRequired?: boolean;password: string;confirmPassword: string;+ recoveryKey?: string;};type RecoveryFormData = {@@ -304,7 +305,7 @@ function RecoveryMethods(props: BaseRecoveryComponentProps<"methods">) {}function RecoveryKeyMethod(props: BaseRecoveryComponentProps<"method:key">) {- const { navigate } = props;+ const { navigate, formData } = props;const [progress, setProgress] = useState(0);useEffect(() => {@@ -336,7 +337,7 @@ function RecoveryKeyMethod(props: BaseRecoveryComponentProps<"method:key">) {await useKeyStore.getState().setValue("userEncryptionKey", form.recoveryKey);- navigate("new", {});+ navigate("new", form);}}><AuthField@@ -346,8 +347,19 @@ function RecoveryKeyMethod(props: BaseRecoveryComponentProps<"method:key">) {helpText={strings.enterRecoveryKeyHelp()}autoComplete="none"autoFocus+ defaultValue={formData?.recoveryKey || ""}/>+ <Flex sx={{ gap: 1 }}>+ <Button+ variant="secondary"+ type="button"+ sx={{ mt: 50, borderRadius: 50 }}+ onClick={() => navigate("methods")}+ >+ {strings.back()}+ </Button><SubmitButton text={strings.startAccountRecovery()} />+ </Flex><Buttontype="button"@@ -417,7 +429,22 @@ function NewPassword(props: BaseRecoveryComponentProps<"new">) {label={strings.confirmPassword()}defaultValue={form?.confirmPassword}/>+ <Flex sx={{ gap: 1 }}>+ <Button+ variant="secondary"+ type="button"+ sx={{ mt: 50, borderRadius: 50 }}+ onClick={() =>+ navigate(+ formData?.userResetRequired ? "methods" : "method:key",+ formData+ )+ }+ >+ {strings.back()}+ </Button><SubmitButton text={strings.continue()} />+ </Flex></>)}</RecoveryForm>diff --git a/packages/intl/locale/en.po b/packages/intl/locale/en.poindex a7faedefa..4bab979f9 100644--- a/packages/intl/locale/en.po+++ b/packages/intl/locale/en.po@@ -1105,6 +1105,10 @@ msgstr "Available on iOS"msgid "Available on iOS & Android"msgstr "Available on iOS & Android"+#: src/strings.ts:2640+msgid "Back"+msgstr "Back"+#: src/strings.ts:2302msgid "Background color"msgstr "Background color"diff --git a/packages/intl/locale/pseudo-LOCALE.po b/packages/intl/locale/pseudo-LOCALE.poindex 1024e447c..2e17e6ebf 100644--- a/packages/intl/locale/pseudo-LOCALE.po+++ b/packages/intl/locale/pseudo-LOCALE.po@@ -1105,6 +1105,10 @@ msgstr ""msgid "Available on iOS & Android"msgstr ""+#: src/strings.ts:2640+msgid "Back"+msgstr ""+#: src/strings.ts:2302msgid "Background color"msgstr ""diff --git a/packages/intl/src/strings.ts b/packages/intl/src/strings.tsindex d8de7c0f3..6b4fc8c71 100644--- a/packages/intl/src/strings.ts+++ b/packages/intl/src/strings.ts@@ -2636,5 +2636,6 @@ Use this if changes from other devices are not appearing on this device. This wideleteData: () => t`Delete data`,failedToAttachFile: () => t`Failed to attach file`,unlockNoteToMergeConflicts: () => t`Unlock note to merge conflicts`,- confirmationEmailSent: () => t`Confirmation email sent`+ confirmationEmailSent: () => t`Confirmation email sent`,+ back: () => t`Back`};