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
45
webclient/src/api/response/ModeratorResponseImpl.ts
Normal file
45
webclient/src/api/response/ModeratorResponseImpl.ts
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { Data } from '@app/types';
|
||||
import type { IModeratorResponse } from '@app/websocket';
|
||||
import { ServerDispatch } from '@app/store';
|
||||
|
||||
export class ModeratorResponseImpl implements IModeratorResponse {
|
||||
banFromServer(userName: string): void {
|
||||
ServerDispatch.banFromServer(userName);
|
||||
}
|
||||
|
||||
banHistory(userName: string, banHistory: Data.ServerInfo_Ban[]): void {
|
||||
ServerDispatch.banHistory(userName, banHistory);
|
||||
}
|
||||
|
||||
viewLogs(logs: Data.ServerInfo_ChatMessage[]): void {
|
||||
ServerDispatch.viewLogs(logs);
|
||||
}
|
||||
|
||||
warnHistory(userName: string, warnHistory: Data.ServerInfo_Warning[]): void {
|
||||
ServerDispatch.warnHistory(userName, warnHistory);
|
||||
}
|
||||
|
||||
warnListOptions(warnList: Data.Response_WarnList[]): void {
|
||||
ServerDispatch.warnListOptions(warnList);
|
||||
}
|
||||
|
||||
warnUser(userName: string): void {
|
||||
ServerDispatch.warnUser(userName);
|
||||
}
|
||||
|
||||
grantReplayAccess(replayId: number, moderatorName: string): void {
|
||||
ServerDispatch.grantReplayAccess(replayId, moderatorName);
|
||||
}
|
||||
|
||||
forceActivateUser(usernameToActivate: string, moderatorName: string): void {
|
||||
ServerDispatch.forceActivateUser(usernameToActivate, moderatorName);
|
||||
}
|
||||
|
||||
getAdminNotes(userName: string, notes: string): void {
|
||||
ServerDispatch.getAdminNotes(userName, notes);
|
||||
}
|
||||
|
||||
updateAdminNotes(userName: string, notes: string): void {
|
||||
ServerDispatch.updateAdminNotes(userName, notes);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue