mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Add types for Moderator commands (#5084)
* Add types for Moderator commands * Support User Priv Level & userLevel
This commit is contained in:
parent
9f515fc804
commit
c5bb38e907
10 changed files with 51 additions and 34 deletions
|
|
@ -15,3 +15,4 @@ export * from './languages';
|
|||
export * from './logs';
|
||||
export * from './session';
|
||||
export * from './deckList';
|
||||
export * from './moderator';
|
||||
|
|
|
|||
21
webclient/src/types/moderator.ts
Normal file
21
webclient/src/types/moderator.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
export interface BanHistoryItem {
|
||||
adminId: string;
|
||||
adminName: string;
|
||||
banTime: string;
|
||||
banLength: string;
|
||||
banReason: string;
|
||||
visibleReason: string;
|
||||
}
|
||||
|
||||
export interface WarnHistoryItem {
|
||||
userName: string;
|
||||
adminName: string;
|
||||
reason: string;
|
||||
timeOf: string;
|
||||
}
|
||||
|
||||
export interface WarnListItem {
|
||||
warning: string;
|
||||
userName: string;
|
||||
userClientid: string;
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ export const KnownHosts = {
|
|||
[KnownHost.TETRARCH]: { port: 443, host: 'mtg.tetrarch.co/servatrice' },
|
||||
}
|
||||
|
||||
export interface Log {
|
||||
export interface LogItem {
|
||||
message: string;
|
||||
senderId: string;
|
||||
senderIp: string;
|
||||
|
|
@ -121,7 +121,7 @@ export interface Log {
|
|||
}
|
||||
|
||||
export interface LogGroups {
|
||||
room: Log[];
|
||||
game: Log[];
|
||||
chat: Log[];
|
||||
room: LogItem[];
|
||||
game: LogItem[];
|
||||
chat: LogItem[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,17 @@
|
|||
export interface User {
|
||||
accountageSecs: number;
|
||||
name: string;
|
||||
privlevel: UserAccessLevel;
|
||||
userLevel: UserPrivLevel;
|
||||
privlevel: UserPrivLevel;
|
||||
userLevel: number;
|
||||
realName?: string;
|
||||
country?: string;
|
||||
avatarBmp?: Uint8Array;
|
||||
}
|
||||
|
||||
export enum UserAccessLevel {
|
||||
'NONE'
|
||||
}
|
||||
|
||||
export enum UserPrivLevel {
|
||||
'unknown 1',
|
||||
'unknown 2',
|
||||
'unknown 3',
|
||||
'unknown 4'
|
||||
NONE = 0,
|
||||
VIP = 1,
|
||||
DONOR = 2
|
||||
}
|
||||
|
||||
export enum UserSortField {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue