mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +00:00
feat: refactor authentication forms to use <form> elements for better submission handling
This commit is contained in:
@@ -92,7 +92,12 @@ export default function PublicSendPage(props: PublicSendPageProps) {
|
||||
{loading && <p className="muted">{t('txt_loading')}</p>}
|
||||
|
||||
{!loading && needPassword && (
|
||||
<>
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
void loadSend(password);
|
||||
}}
|
||||
>
|
||||
<label className="field">
|
||||
<span>{t('txt_password')}</span>
|
||||
<div className="password-wrap">
|
||||
@@ -104,10 +109,10 @@ export default function PublicSendPage(props: PublicSendPageProps) {
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
<button type="button" className="btn btn-primary full" disabled={busy} onClick={() => void loadSend(password)}>
|
||||
<button type="submit" className="btn btn-primary full" disabled={busy}>
|
||||
<Lock size={14} className="btn-icon" /> {t('txt_unlock_send')}
|
||||
</button>
|
||||
</>
|
||||
</form>
|
||||
)}
|
||||
|
||||
{!loading && sendData && (
|
||||
|
||||
Reference in New Issue
Block a user