Webatrice: Add account validation dialog/form (#4547)

* Add account validation dialog/form

* clean up

* close registration dialog on token request

* remove dupe code

* add subtitle styling

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
Jeremy Letto 2022-01-30 19:42:34 -06:00 committed by GitHub
parent 513fcb0908
commit 1d780058c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 200 additions and 16 deletions

View file

@ -93,6 +93,15 @@ export const Actions = {
type: Types.REGISTRATION_USERNAME_ERROR,
error
}),
accountAwaitingActivation: () => ({
type: Types.ACCOUNT_AWAITING_ACTIVATION,
}),
accountActivationSuccess: () => ({
type: Types.ACCOUNT_ACTIVATION_SUCCESS,
}),
accountActivationFailed: () => ({
type: Types.ACCOUNT_ACTIVATION_FAILED,
}),
resetPassword: () => ({
type: Types.RESET_PASSWORD_REQUESTED,
}),

View file

@ -80,6 +80,15 @@ export const Dispatch = {
registrationUserNameError: (error) => {
store.dispatch(Actions.registrationUserNameError(error));
},
accountAwaitingActivation: () => {
store.dispatch(Actions.accountAwaitingActivation());
},
accountActivationSuccess: () => {
store.dispatch(Actions.accountActivationSuccess());
},
accountActivationFailed: () => {
store.dispatch(Actions.accountActivationFailed());
},
resetPassword: () => {
store.dispatch(Actions.resetPassword());
},

View file

@ -22,6 +22,9 @@ export const Types = {
REGISTRATION_EMAIL_ERROR: '[Server] Registration Email Error',
REGISTRATION_PASSWORD_ERROR: '[Server] Registration Password Error',
REGISTRATION_USERNAME_ERROR: '[Server] Registration Username Error',
ACCOUNT_AWAITING_ACTIVATION: '[Server] Account Awaiting Activation',
ACCOUNT_ACTIVATION_SUCCESS: '[Server] Account Activation Success',
ACCOUNT_ACTIVATION_FAILED: '[Server] Account Activation Failed',
RESET_PASSWORD_REQUESTED: '[Server] Reset Password Requested',
RESET_PASSWORD_FAILED: '[Server] Reset Password Failed',
RESET_PASSWORD_CHALLENGE: '[Server] Reset Password Challenge',