Unverified Commit 771ef44d authored by Zeng1998's avatar Zeng1998 Committed by GitHub

feat: support enter to signin (#1014)

parent 76c42c6c
...@@ -117,6 +117,12 @@ const Auth = () => { ...@@ -117,6 +117,12 @@ const Auth = () => {
actionBtnLoadingState.setFinish(); actionBtnLoadingState.setFinish();
}; };
const handleSignInKeyUp = (e: React.KeyboardEvent) => {
if (e.key === "Enter") {
handleSignInBtnClick();
}
};
return ( return (
<div className="page-wrapper auth"> <div className="page-wrapper auth">
<div className="page-container"> <div className="page-container">
...@@ -135,7 +141,14 @@ const Auth = () => { ...@@ -135,7 +141,14 @@ const Auth = () => {
</div> </div>
<div className="form-item-container input-form-container"> <div className="form-item-container input-form-container">
<span className={`normal-text ${password ? "not-null" : ""}`}>{t("common.password")}</span> <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> </div>
<div className="action-btns-container"> <div className="action-btns-container">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment