mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -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
|
|
@ -1,10 +1,16 @@
|
|||
import { Type } from 'protobufjs';
|
||||
import { WebSocketConnectOptions } from 'types';
|
||||
|
||||
import { Types } from './server.types';
|
||||
|
||||
export const Actions = {
|
||||
clearStore: () => ({
|
||||
type: Types.CLEAR_STORE
|
||||
}),
|
||||
loginSuccessful: (options: WebSocketConnectOptions) => ({
|
||||
type: Types.LOGIN_SUCCESSFUL,
|
||||
options
|
||||
}),
|
||||
connectionClosed: reason => ({
|
||||
type: Types.CONNECTION_CLOSED,
|
||||
reason
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ export const Dispatch = {
|
|||
clearStore: () => {
|
||||
store.dispatch(Actions.clearStore());
|
||||
},
|
||||
loginSuccessful: options => {
|
||||
store.dispatch(Actions.loginSuccessful(options));
|
||||
},
|
||||
connectionClosed: reason => {
|
||||
store.dispatch(Actions.connectionClosed(reason));
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,24 +3,26 @@ import { Log, SortBy, User, UserSortField } from 'types';
|
|||
export interface ServerConnectParams {
|
||||
host: string;
|
||||
port: string;
|
||||
user: string;
|
||||
pass: string;
|
||||
userName: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface ServerRegisterParams {
|
||||
host: string;
|
||||
port: string;
|
||||
user: string;
|
||||
pass: string;
|
||||
passAgain: string;
|
||||
userName: string;
|
||||
password: string;
|
||||
email: string;
|
||||
country: string;
|
||||
realName: string;
|
||||
}
|
||||
|
||||
export interface RequestPasswordSaltParams {
|
||||
userName: string;
|
||||
}
|
||||
|
||||
export interface ForgotPasswordParams {
|
||||
user: string;
|
||||
clientid: string;
|
||||
userName: string;
|
||||
}
|
||||
|
||||
export interface ForgotPasswordChallengeParams extends ForgotPasswordParams {
|
||||
|
|
@ -33,8 +35,7 @@ export interface ForgotPasswordResetParams extends ForgotPasswordParams {
|
|||
}
|
||||
|
||||
export interface AccountActivationParams extends ServerRegisterParams {
|
||||
activationCode: string;
|
||||
clientid: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
export interface ServerState {
|
||||
|
|
@ -68,7 +69,3 @@ export interface ServerStateLogs {
|
|||
export interface ServerStateSortUsersBy extends SortBy {
|
||||
field: UserSortField
|
||||
}
|
||||
|
||||
export interface RequestPasswordSaltParams {
|
||||
user: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
export const Types = {
|
||||
CLEAR_STORE: '[Server] Clear Store',
|
||||
LOGIN_SUCCESSFUL: '[Server] Login Successful',
|
||||
CONNECTION_CLOSED: '[Server] Connection Closed',
|
||||
SERVER_MESSAGE: '[Server] Server Message',
|
||||
UPDATE_BUDDY_LIST: '[Server] Update Buddy List',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue