新增:管理员命令系统(警告/踢出/禁言/冻结/查看私信/站长公屏)
- 新建 AdminCommandController 处理6个管理操作命令
- 注册管理员命令路由 /command/*
- 更新 UserKicked 事件增加原因字段
- 更新 UserMuted 事件支持自定义提示消息
- 重构用户名片弹窗管理面板:警告/踢出/禁言/冻结按钮
- 站长专属:查看私信记录、📢公屏讲话按钮
- 被踢出时显示踢出原因
This commit is contained in:
@@ -31,6 +31,7 @@ class UserMuted implements ShouldBroadcast
|
||||
public readonly int $roomId,
|
||||
public readonly string $username,
|
||||
public readonly int $muteTime,
|
||||
public readonly string $message = '',
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -52,9 +53,9 @@ class UserMuted implements ShouldBroadcast
|
||||
*/
|
||||
public function broadcastWith(): array
|
||||
{
|
||||
$statusMessage = $this->muteTime > 0
|
||||
? "用户 [{$this->username}] 已被系统封口 {$this->muteTime} 次发言时间。"
|
||||
: "用户 [{$this->username}] 已被解除封口。";
|
||||
$statusMessage = $this->message ?: ($this->muteTime > 0
|
||||
? "用户 [{$this->username}] 已被禁言 {$this->muteTime} 分钟。"
|
||||
: "用户 [{$this->username}] 已被解除禁言。");
|
||||
|
||||
return [
|
||||
'username' => $this->username,
|
||||
|
||||
Reference in New Issue
Block a user