mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-23 07:03:54 -07:00
Webatrice: Adding joined game to persistence layer (#5068)
* Adding joined game to persistence layer * Linting fixes
This commit is contained in:
parent
1ab723ca64
commit
ea8da24215
7 changed files with 63 additions and 12 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import { GameSortField, Room, SortBy, UserSortField } from 'types';
|
||||
import { GameSortField, Room, Game, SortBy, UserSortField } from 'types';
|
||||
|
||||
export interface RoomsState {
|
||||
rooms: RoomsStateRooms;
|
||||
joined: JoinedRooms;
|
||||
games: RoomsStateGames;
|
||||
joinedRoomIds: JoinedRooms;
|
||||
joinedGameIds: JoinedGames;
|
||||
messages: RoomsStateMessages;
|
||||
sortGamesBy: RoomsStateSortGamesBy;
|
||||
sortUsersBy: RoomsStateSortUsersBy;
|
||||
|
|
@ -12,10 +14,22 @@ export interface RoomsStateRooms {
|
|||
[roomId: number]: Room;
|
||||
}
|
||||
|
||||
export interface RoomsStateGames {
|
||||
[roomId: number]: {
|
||||
[gameId: number]: Game;
|
||||
};
|
||||
}
|
||||
|
||||
export interface JoinedRooms {
|
||||
[roomId: number]: boolean;
|
||||
}
|
||||
|
||||
export interface JoinedGames {
|
||||
[roomId: number]: {
|
||||
[gameId: number]: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface RoomsStateMessages {
|
||||
[roomId: number]: Message[];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue