mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
Support password reset workflow on Webatrice (#4445)
* Support password reset workflow. Also fix issue where a user would be disconnected "randomly" if they had a failed login, then successful one. Refactored a bit on Status Labels since they weren't really necessary and added complexity. * Disconnect in default cases where we don't know what to do, but shouldn't stay connected to the server
This commit is contained in:
parent
013bb8269f
commit
ac300b0b6d
10 changed files with 189 additions and 77 deletions
|
|
@ -7,30 +7,11 @@ export enum StatusEnum {
|
|||
DISCONNECTED,
|
||||
CONNECTING,
|
||||
CONNECTED,
|
||||
LOGGINGIN,
|
||||
LOGGEDIN,
|
||||
REGISTERING,
|
||||
REGISTERED,
|
||||
ACTIVATING_ACCOUNT,
|
||||
ACCOUNT_ACTIVATED,
|
||||
RECOVERING_PASSWORD,
|
||||
LOGGING_IN,
|
||||
LOGGED_IN,
|
||||
DISCONNECTING = 99
|
||||
}
|
||||
|
||||
export enum StatusEnumLabel {
|
||||
"Disconnected",
|
||||
"Connecting" ,
|
||||
"Connected" ,
|
||||
"Loggingin",
|
||||
"Loggedin",
|
||||
"Registering",
|
||||
"Registered",
|
||||
"ActivatingAccount",
|
||||
"AccountActivated",
|
||||
"RecoveringPassword",
|
||||
"Disconnecting" = 99
|
||||
}
|
||||
|
||||
export class Host {
|
||||
id?: number;
|
||||
name: string;
|
||||
|
|
@ -83,14 +64,6 @@ export const KnownHosts = {
|
|||
[KnownHost.TETRARCH]: { port: 443, host: 'mtg.tetrarch.co/servatrice'},
|
||||
}
|
||||
|
||||
export const getStatusEnumLabel = (statusEnum: number) => {
|
||||
if (StatusEnumLabel[statusEnum] !== undefined) {
|
||||
return StatusEnumLabel[statusEnum];
|
||||
}
|
||||
|
||||
return "Unknown";
|
||||
};
|
||||
|
||||
export interface Log {
|
||||
message: string;
|
||||
senderId: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue