- 新增 ChatUserPicker 用户选择器:支持按用户名/邮箱/账号 ID 或玩家名称搜索,封禁与游客不可选,支持排除与白名单 - 房管任命与撤销 - 聚落房间可任命聚落主,展示当前聚落主 - 房间审计记录查看,操作类型本地化映射 - 补充对应 API 与类型定义 - i18n 白名单加入 ID 缩写 - 中英文各补 31 个文案
This commit is contained in:
1 parent
ef1435bd31
commit
ac38c98203
6 files changed
+772
-2
No files matched your search
@@ -2193,3 +2193,62 @@ export async function skinSiteChatRoomAvatarFetch(roomId: number): Promise<Blob
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
export interface SkinSiteChatUserInfo {
|
||||
uuid: string
|
||||
id: number
|
||||
username: string
|
||||
avatar?: string | null
|
||||
email: string
|
||||
qq?: number | null
|
||||
permissions: string[]
|
||||
banned: boolean
|
||||
registerTime: number
|
||||
}
|
||||
|
||||
export interface SkinSiteChatAuditInfo {
|
||||
id: number
|
||||
actorUuid: string
|
||||
actorName?: string
|
||||
action: string
|
||||
target?: string | null
|
||||
createdAt: number
|
||||
}
|
||||
|
||||
export function skinSiteChatUserSearch(
|
||||
keyword: string,
|
||||
roomId?: number,
|
||||
searchBy: 'user' | 'player' = 'user',
|
||||
): Promise<SkinSiteResponse<SkinSiteChatUserInfo[]>> {
|
||||
const query = new URLSearchParams({ keyword })
|
||||
if (roomId !== undefined) query.set('room_id', String(roomId))
|
||||
if (searchBy === 'player') query.set('search_by', 'player')
|
||||
return skinSiteRequest<SkinSiteChatUserInfo[]>('chat/users/search?' + query.toString())
|
||||
}
|
||||
|
||||
export function skinSiteChatManagerSet(
|
||||
roomId: number,
|
||||
userUuid: string,
|
||||
manager: boolean,
|
||||
): Promise<SkinSiteResponse<string>> {
|
||||
return skinSiteRequest<string>('chat/admin/rooms/' + roomId + '/manager', {
|
||||
method: 'POST',
|
||||
body: { userUuid, manager },
|
||||
})
|
||||
}
|
||||
|
||||
export function skinSiteChatSettlementOwnerAssign(
|
||||
roomId: number,
|
||||
userUuid: string,
|
||||
): Promise<SkinSiteResponse<string>> {
|
||||
return skinSiteRequest<string>('chat/settlements/' + roomId + '/owner', {
|
||||
method: 'POST',
|
||||
body: { userUuid },
|
||||
})
|
||||
}
|
||||
|
||||
export function skinSiteChatAuditList(
|
||||
roomId: number,
|
||||
): Promise<SkinSiteResponse<SkinSiteChatAuditInfo[]>> {
|
||||
return skinSiteRequest<SkinSiteChatAuditInfo[]>('chat/rooms/' + roomId + '/audit')
|
||||
}
|
||||
Reference in new issue
Block a user