mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
Webatrice: KnownHosts component (#4456)
* refactor dexie services for future schema updates Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
parent
37879c4255
commit
6ce346af4a
54 changed files with 1381 additions and 1291 deletions
|
|
@ -10,3 +10,4 @@ export * from './routes';
|
|||
export * from './sort';
|
||||
export * from './forms';
|
||||
export * from './message';
|
||||
export * from './settings';
|
||||
|
|
|
|||
|
|
@ -12,6 +12,29 @@ export enum StatusEnum {
|
|||
DISCONNECTING = 99
|
||||
}
|
||||
|
||||
export interface WebSocketConnectOptions {
|
||||
host?: string;
|
||||
port?: string;
|
||||
userName?: string;
|
||||
password?: string;
|
||||
hashedPassword?: string;
|
||||
newPassword?: string;
|
||||
email?: string;
|
||||
autojoinrooms?: boolean;
|
||||
keepalive?: number;
|
||||
clientid?: string;
|
||||
reason?: WebSocketConnectReason;
|
||||
}
|
||||
|
||||
export enum WebSocketConnectReason {
|
||||
LOGIN,
|
||||
REGISTER,
|
||||
ACTIVATE_ACCOUNT,
|
||||
PASSWORD_RESET_REQUEST,
|
||||
PASSWORD_RESET_CHALLENGE,
|
||||
PASSWORD_RESET
|
||||
}
|
||||
|
||||
export class Host {
|
||||
id?: number;
|
||||
name: string;
|
||||
|
|
@ -20,6 +43,10 @@ export class Host {
|
|||
localHost?: string;
|
||||
localPort?: string;
|
||||
editable: boolean;
|
||||
lastSelected?: boolean;
|
||||
userName?: string;
|
||||
hashedPassword?: string;
|
||||
remember?: boolean;
|
||||
}
|
||||
|
||||
export const DefaultHosts: Host[] = [
|
||||
|
|
@ -40,7 +67,7 @@ export const DefaultHosts: Host[] = [
|
|||
{
|
||||
name: 'Tetrarch',
|
||||
host: 'mtg.tetrarch.co/servatrice',
|
||||
port: '4748',
|
||||
port: '443',
|
||||
editable: false,
|
||||
},
|
||||
];
|
||||
|
|
|
|||
6
webclient/src/types/settings.ts
Normal file
6
webclient/src/types/settings.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export class Setting {
|
||||
user: string;
|
||||
autoConnect?: boolean;
|
||||
}
|
||||
|
||||
export const APP_USER = '*app';
|
||||
Loading…
Add table
Add a link
Reference in a new issue