Skip to content

Commit

Permalink
Try again to make safari save passwords more reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAman62 committed Sep 3, 2024
1 parent 2e7ee0e commit 3ae9b00
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ui/src/UserContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ function LoginModal({
});
return;
}
setVerificationCode("");
return login(e);
});
};
Expand Down Expand Up @@ -317,11 +318,13 @@ function LoginModal({
return;
}
setPage("login");
setVerificationCode("");
navigate("#");
});
};

const returnToLogin = (
<a href="#" className="inline-flex items-center mb-4 text-sm text-sky-400 hover:text-sky-600" onClick={() => setPage("login")}>
<a href="#" className="flex items-center mb-4 text-sm text-sky-400 hover:text-sky-600" onClick={() => setPage("login")}>
<RxCaretLeft /> <span>Return to Login</span>
</a>
);
Expand Down Expand Up @@ -366,8 +369,8 @@ function LoginModal({
/>
)}
<FloatingLabel
id="password"
name="password"
id={page === "login" ? "current-password" : "new-password"}
name={page === "login" ? "current-password" : "new-password"}
className="dark:bg-slate-900"
variant="outlined"
label="Password"
Expand Down Expand Up @@ -437,7 +440,7 @@ function LoginModal({
);

const changePasswordForm = (
<form action="#" method="POST" onSubmit={confirmChangePassword}>
<form action="#" method="POST" onSubmit={confirmChangePassword} autoComplete="on">
{returnToLogin}
<span className="dark:text-gray-100">A verification code has been sent to your email. Please enter it and your new password.</span>
<FloatingLabel
Expand Down

0 comments on commit 3ae9b00

Please sign in to comment.