diff --git a/apps/mobile/app/components/auth/change-password.js b/apps/mobile/app/components/auth/change-password.js
index 321f22746..311ba41f9 100644
--- a/apps/mobile/app/components/auth/change-password.js
+++ b/apps/mobile/app/components/auth/change-password.js
@@ -17,26 +17,20 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+import { strings } from "@notesnook/intl";
import React, { useRef, useState } from "react";
import { View } from "react-native";
import { db } from "../../common/database";
-import {
- eSendEvent,
- presentSheet,
- ToastManager
-} from "../../services/event-manager";
+import BackupService from "../../services/backup";
+import { eSendEvent, ToastManager } from "../../services/event-manager";
+import Navigation from "../../services/navigation";
import { useUserStore } from "../../stores/use-user-store";
-import { eCloseSheet, eOpenRecoveryKeyDialog } from "../../utils/events";
-import DialogHeader from "../dialog/dialog-header";
+import { eOpenRecoveryKeyDialog } from "../../utils/events";
+import { DefaultAppStyles } from "../../utils/styles";
+import { Dialog } from "../dialog";
import { Button } from "../ui/button";
import Input from "../ui/input";
import { Notice } from "../ui/notice";
-import Seperator from "../ui/seperator";
-import { Dialog } from "../dialog";
-import BackupService from "../../services/backup";
-import { sleep } from "../../utils/time";
-import { strings } from "@notesnook/intl";
-import { DefaultAppStyles } from "../../utils/styles";
export const ChangePassword = () => {
const passwordInputRef = useRef();
@@ -85,8 +79,7 @@ export const ChangePassword = () => {
context: "global"
});
setLoading(false);
- eSendEvent(eCloseSheet);
- await sleep(300);
+ Navigation.goBack();
eSendEvent(eOpenRecoveryKeyDialog);
} catch (e) {
setLoading(false);
@@ -108,9 +101,6 @@ export const ChangePassword = () => {
}}
>
-
-
-
{
@@ -160,9 +150,3 @@ export const ChangePassword = () => {
);
};
-
-ChangePassword.present = () => {
- presentSheet({
- component:
- });
-};
diff --git a/apps/mobile/app/components/auth/login.js b/apps/mobile/app/components/auth/login.js
index 0efee870a..6b75f44fe 100644
--- a/apps/mobile/app/components/auth/login.js
+++ b/apps/mobile/app/components/auth/login.js
@@ -39,6 +39,7 @@ import { hideAuth } from "./common";
import { ForgotPassword } from "./forgot-password";
import { useLogin } from "./use-login";
import { DefaultAppStyles } from "../../utils/styles";
+import { Dialog } from "../dialog";
const LoginSteps = {
emailAuth: 1,
@@ -89,7 +90,7 @@ export const Login = ({ changeMode }) => {
return (
<>
-
+
{
const { colors } = useThemeColors();
@@ -46,7 +43,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo, onCancel }) => {
method: mfaInfo?.primaryMethod,
isPrimary: true
});
- const { seconds, start } = useTimer(currentMethod.method);
+ const { seconds, start, reset } = useTimer(currentMethod.method);
const [loading, setLoading] = useState(false);
const inputRef = useRef();
const [sending, setSending] = useState(false);
@@ -62,7 +59,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo, onCancel }) => {
},
(result) => {
if (result) {
- eSendEvent(eCloseSheet, "two_factor_verify");
+ eSendEvent(eCloseSimpleDialog, "two_factor_verify");
}
setLoading(false);
}
@@ -133,6 +130,12 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo, onCancel }) => {
{