恢复用户卡片私信查看
This commit is contained in:
@@ -421,7 +421,8 @@
|
||||
$canBanUser = Auth::id() === 1 || (($roomPermissionMap[\App\Support\PositionPermissionRegistry::USER_BAN] ?? false) === true);
|
||||
$canBanIpUser = Auth::id() === 1 || (($roomPermissionMap[\App\Support\PositionPermissionRegistry::USER_BANIP] ?? false) === true);
|
||||
$canRewardUser = Auth::id() === 1 || (($roomPermissionMap[\App\Support\PositionPermissionRegistry::ROOM_REWARD] ?? false) === true);
|
||||
$hasUserModerationPermission = $canWarnUser || $canKickUser || $canMuteUser || $canBanUser || $canBanIpUser;
|
||||
$canViewWhispers = $myLevel >= $superLevel;
|
||||
$hasUserModerationPermission = $canWarnUser || $canKickUser || $canMuteUser || $canBanUser || $canBanIpUser || $canViewWhispers;
|
||||
$hasPositionActions = Auth::user()->activePosition || $myLevel >= $superLevel;
|
||||
@endphp
|
||||
@if ($hasUserModerationPermission || $hasPositionActions)
|
||||
@@ -445,43 +446,49 @@
|
||||
<div style="font-size: 10px; color: #9ca3af; margin-bottom: 4px; padding-left: 2px;">
|
||||
管理员操作
|
||||
</div>
|
||||
<div style="display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;">
|
||||
<div style="display: flex; gap: 4px; flex-wrap: nowrap; margin-bottom: 8px;">
|
||||
@if ($canWarnUser)
|
||||
<button
|
||||
style="flex:1; padding: 5px; border-radius: 4px; font-size: 11px; background: #fef3c7; border: 1px solid #f59e0b; cursor: pointer;"
|
||||
x-on:click="warnUser()">⚠️ 警告
|
||||
style="flex: 1 1 0; min-width: 0; padding: 5px 3px; border-radius: 4px; font-size: 11px; white-space: nowrap; background: #fef3c7; border: 1px solid #f59e0b; cursor: pointer;"
|
||||
x-on:click="warnUser()">警告
|
||||
</button>
|
||||
@endif
|
||||
@if ($canKickUser)
|
||||
<button
|
||||
style="flex:1; padding: 5px; border-radius: 4px; font-size: 11px; background: #fee2e2; border: 1px solid #ef4444; cursor: pointer;"
|
||||
x-on:click="kickUser()">🚫 踢出
|
||||
style="flex: 1 1 0; min-width: 0; padding: 5px 3px; border-radius: 4px; font-size: 11px; white-space: nowrap; background: #fee2e2; border: 1px solid #ef4444; cursor: pointer;"
|
||||
x-on:click="kickUser()">踢出
|
||||
</button>
|
||||
@endif
|
||||
@if ($canMuteUser)
|
||||
<button
|
||||
style="flex:1; padding: 5px; border-radius: 4px; font-size: 11px; background: #e0e7ff; border: 1px solid #6366f1; cursor: pointer;"
|
||||
x-on:click="isMuting = !isMuting">🔇 禁言
|
||||
style="flex: 1 1 0; min-width: 0; padding: 5px 3px; border-radius: 4px; font-size: 11px; white-space: nowrap; background: #e0e7ff; border: 1px solid #6366f1; cursor: pointer;"
|
||||
x-on:click="isMuting = !isMuting">禁言
|
||||
</button>
|
||||
@endif
|
||||
@if ($canBanUser)
|
||||
<button
|
||||
style="flex:1; padding: 5px; border-radius: 4px; font-size: 11px; background: #fee2e2; border: 1px solid #b91c1c; cursor: pointer;"
|
||||
x-on:click="banUser()">⛔ 封号
|
||||
style="flex: 1 1 0; min-width: 0; padding: 5px 3px; border-radius: 4px; font-size: 11px; white-space: nowrap; background: #fee2e2; border: 1px solid #b91c1c; cursor: pointer;"
|
||||
x-on:click="banUser()">封号
|
||||
</button>
|
||||
@endif
|
||||
@if ($canBanIpUser)
|
||||
<button
|
||||
style="flex:1; padding: 5px; border-radius: 4px; font-size: 11px; background: #ffedd5; border: 1px solid #c2410c; cursor: pointer;"
|
||||
x-on:click="banIpUser()">🌐 封IP
|
||||
style="flex: 1 1 0; min-width: 0; padding: 5px 3px; border-radius: 4px; font-size: 11px; white-space: nowrap; background: #ffedd5; border: 1px solid #c2410c; cursor: pointer;"
|
||||
x-on:click="banIpUser()">封IP
|
||||
</button>
|
||||
@endif
|
||||
@if ($canViewWhispers)
|
||||
<button
|
||||
style="flex: 1 1 0; min-width: 0; padding: 5px 3px; border-radius: 4px; font-size: 11px; white-space: nowrap; background: #ecfeff; border: 1px solid #0891b2; cursor: pointer;"
|
||||
x-on:click="loadWhispers()">私信
|
||||
</button>
|
||||
@endif
|
||||
|
||||
{{-- 职务奖励金币(凭空产生),仅有明确奖励权限且 max_reward != 0 的人可见 --}}
|
||||
@if ($canRewardUser)
|
||||
<button x-show="window.chatContext?.myMaxReward !== 0"
|
||||
style="flex:1; padding: 5px; border-radius: 4px; font-size: 11px; background: #fef3c7; border: 1px solid #f59e0b; cursor: pointer;"
|
||||
x-on:click="openRewardModal(userInfo.username)">💰 奖励金币
|
||||
style="flex: 1 1 0; min-width: 0; padding: 5px 3px; border-radius: 4px; font-size: 11px; white-space: nowrap; background: #fef3c7; border: 1px solid #f59e0b; cursor: pointer;"
|
||||
x-on:click="openRewardModal(userInfo.username)">奖励
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user