mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Webatrice: fix saved password (#4563)
* fix saved label, and fix using hashedPassword when Save is unchecked * update host only after successful login * cleanup * fix ability to deselect saved password on successful login * cleanup * clear options after connection * fix registration saved username * cleanup * change label * fix tests Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
parent
9577ada171
commit
2a54e9d7d1
15 changed files with 170 additions and 169 deletions
|
|
@ -11,8 +11,9 @@ export class WebClient {
|
|||
|
||||
public protocolVersion = 14;
|
||||
public clientConfig = {
|
||||
'clientver': 'webclient-1.0 (2019-10-31)',
|
||||
'clientfeatures': [
|
||||
clientid: 'webatrice',
|
||||
clientver: 'webclient-1.0 (2019-10-31)',
|
||||
clientfeatures: [
|
||||
'client_id',
|
||||
'client_ver',
|
||||
'feature_set',
|
||||
|
|
@ -30,22 +31,13 @@ export class WebClient {
|
|||
]
|
||||
};
|
||||
|
||||
public options: WebSocketConnectOptions = {
|
||||
host: '',
|
||||
port: '',
|
||||
userName: '',
|
||||
password: '',
|
||||
hashedPassword: '',
|
||||
newPassword: '',
|
||||
email: '',
|
||||
realName: '',
|
||||
country: '',
|
||||
clientid: null,
|
||||
reason: null,
|
||||
public clientOptions = {
|
||||
autojoinrooms: true,
|
||||
keepalive: 5000
|
||||
};
|
||||
|
||||
public options: WebSocketConnectOptions;
|
||||
|
||||
public connectionAttemptMade = false;
|
||||
|
||||
constructor() {
|
||||
|
|
@ -64,7 +56,7 @@ export class WebClient {
|
|||
|
||||
public connect(options: WebSocketConnectOptions) {
|
||||
this.connectionAttemptMade = true;
|
||||
this.options = { ...this.options, ...options };
|
||||
this.options = options;
|
||||
this.socket.connect(this.options);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue