mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
refactor redux data model
This commit is contained in:
parent
ae1bc3da38
commit
0ff391491d
243 changed files with 5212 additions and 5963 deletions
|
|
@ -2,13 +2,16 @@ import { App, Data, Enriched } from '@app/types';
|
|||
|
||||
export interface ServerState {
|
||||
initialized: boolean;
|
||||
buddyList: Data.ServerInfo_User[];
|
||||
ignoreList: Data.ServerInfo_User[];
|
||||
/** Buddies keyed by username for O(1) lookup. Use `getSortedBuddyList` for display. */
|
||||
buddyList: { [userName: string]: Data.ServerInfo_User };
|
||||
/** Ignored users keyed by username for O(1) lookup. Use `getSortedIgnoreList` for display. */
|
||||
ignoreList: { [userName: string]: Data.ServerInfo_User };
|
||||
info: ServerStateInfo;
|
||||
status: ServerStateStatus;
|
||||
logs: ServerStateLogs;
|
||||
user: Data.ServerInfo_User | null;
|
||||
users: Data.ServerInfo_User[];
|
||||
/** Connected users keyed by username for O(1) lookup. Use `getSortedUsers` for display. */
|
||||
users: { [userName: string]: Data.ServerInfo_User };
|
||||
sortUsersBy: ServerStateSortUsersBy;
|
||||
messages: {
|
||||
[userName: string]: Data.Event_UserMessage[];
|
||||
|
|
@ -28,7 +31,8 @@ export interface ServerState {
|
|||
warnListOptions: Data.Response_WarnList[];
|
||||
warnUser: string;
|
||||
adminNotes: { [userName: string]: string };
|
||||
replays: Data.ServerInfo_ReplayMatch[];
|
||||
/** Replays keyed by gameId for O(1) lookup/update. */
|
||||
replays: { [gameId: number]: Data.ServerInfo_ReplayMatch };
|
||||
backendDecks: Data.Response_DeckList | null;
|
||||
gamesOfUser: { [userName: string]: Enriched.Game[] };
|
||||
registrationError: string | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue