mirror of
https://github.com/usememos/memos.git
synced 2024-11-28 14:23:15 +03:00
feat: support enter to signin (#1014)
This commit is contained in:
parent
76c42c6c9f
commit
771ef44d82
@ -117,6 +117,12 @@ const Auth = () => {
|
||||
actionBtnLoadingState.setFinish();
|
||||
};
|
||||
|
||||
const handleSignInKeyUp = (e: React.KeyboardEvent) => {
|
||||
if (e.key === "Enter") {
|
||||
handleSignInBtnClick();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="page-wrapper auth">
|
||||
<div className="page-container">
|
||||
@ -135,7 +141,14 @@ const Auth = () => {
|
||||
</div>
|
||||
<div className="form-item-container input-form-container">
|
||||
<span className={`normal-text ${password ? "not-null" : ""}`}>{t("common.password")}</span>
|
||||
<input className="input-text" type="password" value={password} onChange={handlePasswordInputChanged} required />
|
||||
<input
|
||||
className="input-text"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={handlePasswordInputChanged}
|
||||
onKeyUp={handleSignInKeyUp}
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="action-btns-container">
|
||||
|
Loading…
Reference in New Issue
Block a user