refactor login flow
Makes the login flow use form submission. Also updated password component to use the same base classes of Blazor Ionic, while also making the shake feature built on to the validation engine + submission.
https://docs.microsoft.com/en-us/aspnet/core/blazor/forms-validation?view=aspnetcore-6.0
I really tried to understand this pull request but I don't. I understand why form submissions make sense in an http app but not here.
Why do we need data annotations validation? This is password submission, not checking if a name is < 10 characters. Why wouldn't form submission alone be sufficient?
As tested in iOS merged with master,
- It doesn't accept a valid password (Because
Passwordis no longer bound in theSubmitPassword()Scope - an Invalid password doesn't shake any longer (How would you do this without waiting for the result from the keystore validation?)
- after entering an invalid password the "Log in" button is disabled permanently
- if you had an invalid password you used to be able to hit delete once and it would clear the field. This removes that
it shakes once on bad password then gets in a state where it won't shake anymore