mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-26 03:14:44 -08:00
Webatrice: tech debt (#4560)
* turn autocomplete off by default on inputs * trim input fields onSubmit * move trim to form submit * cleanup * remove dead code * protect trim against null values * make password optional on Login for servers that allow unregisted logins * cleanup Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
@@ -159,6 +159,10 @@ const Login = ({ state, description }: LoginProps) => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleAccountActivationDialogSubmit = ({ token }) => {
|
||||
AuthenticationService.activateAccount({ token } as any);
|
||||
};
|
||||
|
||||
const handleRequestPasswordResetDialogSubmit = (form) => {
|
||||
const { userName, email, selectedHost } = form;
|
||||
const { host, port } = getHostPort(selectedHost);
|
||||
@@ -173,11 +177,8 @@ const Login = ({ state, description }: LoginProps) => {
|
||||
|
||||
const handleResetPasswordDialogSubmit = ({ userName, token, newPassword, selectedHost }) => {
|
||||
const { host, port } = getHostPort(selectedHost);
|
||||
AuthenticationService.resetPassword({ userName, token, newPassword, host, port } as any);
|
||||
};
|
||||
|
||||
const handleAccountActivationDialogSubmit = ({ token }) => {
|
||||
AuthenticationService.activateAccount({ token } as any);
|
||||
AuthenticationService.resetPassword({ userName, token, newPassword, host, port } as any);
|
||||
};
|
||||
|
||||
const skipTokenRequest = (userName) => {
|
||||
|
||||
Reference in New Issue
Block a user