projects
/
pokerwave.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c77465
)
show some "ProtocolError" error messages to user
author
Geoffrey Allott
<geoffrey@allott.email>
Sun, 14 Mar 2021 01:23:02 +0000
(
01:23
+0000)
committer
Geoffrey Allott
<geoffrey@allott.email>
Sun, 14 Mar 2021 01:23:02 +0000
(
01:23
+0000)
site/modules/socket.js
patch
|
blob
|
history
diff --git
a/site/modules/socket.js
b/site/modules/socket.js
index a610ac1a866acd2b3b0282aa2c25224281289752..d0bd1defcf16dc28f347aced7a6c19f999fca841 100644
(file)
--- a/
site/modules/socket.js
+++ b/
site/modules/socket.js
@@
-104,6
+104,16
@@
export class Socket {
this.show_login();
this.state = "Connected";
break;
+ case "ProtocolError":
+ switch (this.state) {
+ case "LoginSent":
+ this.show_login(message.reason);
+ break;
+ case "CreateUserSent":
+ this.show_create_user(message.reason);
+ break;
+ }
+ break;
}
}
@@
-150,6
+160,7
@@
export class Socket {
this.show_create_user("Passwords do not match");
} else {
this.send(new Auth(username, password).create_user_message());
+ this.state = "CreateUserSent";
}
};
}