mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
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:
parent
513fcb0908
commit
1d780058c8
12 changed files with 200 additions and 16 deletions
|
|
@ -137,7 +137,7 @@ export class SessionCommands {
|
|||
webClient.protobuf.sendSessionCommand(sc, raw => {
|
||||
switch (raw.responseCode) {
|
||||
case webClient.protobuf.controller.Response.ResponseCode.RespOk: {
|
||||
const passwordSalt = raw['.Response_PasswordSalt.ext'].passwordSalt;
|
||||
const passwordSalt = raw['.Response_PasswordSalt.ext']?.passwordSalt;
|
||||
SessionCommands.login(passwordSalt);
|
||||
break;
|
||||
}
|
||||
|
|
@ -236,6 +236,7 @@ export class SessionCommands {
|
|||
|
||||
webClient.protobuf.sendSessionCommand(sc, raw => {
|
||||
if (raw.responseCode === webClient.protobuf.controller.Response.ResponseCode.RespActivationAccepted) {
|
||||
SessionPersistence.accountActivationSuccess();
|
||||
SessionCommands.login();
|
||||
} else {
|
||||
SessionCommands.updateStatus(StatusEnum.DISCONNECTED, 'Account Activation Failed');
|
||||
|
|
|
|||
|
|
@ -78,11 +78,15 @@ export class SessionPersistence {
|
|||
}
|
||||
|
||||
static accountAwaitingActivation() {
|
||||
console.log('Open Modal for Activation Code input');
|
||||
ServerDispatch.accountAwaitingActivation();
|
||||
}
|
||||
|
||||
static accountActivationSuccess() {
|
||||
ServerDispatch.accountActivationSuccess();
|
||||
}
|
||||
|
||||
static accountActivationFailed() {
|
||||
console.log('Account activation failed, show an action here');
|
||||
ServerDispatch.accountActivationFailed();
|
||||
}
|
||||
|
||||
static registrationRequiresEmail() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue