收口聊天室安全边界并优化特效生命周期
This commit is contained in:
@@ -167,8 +167,8 @@
|
||||
}
|
||||
this.restoreVideoDOM();
|
||||
|
||||
if (typeof EffectManager !== 'undefined' && typeof EffectManager.audioManager !== 'undefined') {
|
||||
EffectManager.audioManager.sounds.gold_received?.play().catch(()=>{});
|
||||
if (typeof EffectSounds !== 'undefined') {
|
||||
EffectSounds.ding();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -308,8 +308,8 @@
|
||||
}
|
||||
|
||||
// 播放到账特定金币音效
|
||||
if (typeof EffectManager !== 'undefined' && typeof EffectManager.audioManager !== 'undefined') {
|
||||
EffectManager.audioManager.sounds.gold_received?.play().catch(()=>{});
|
||||
if (typeof EffectSounds !== 'undefined') {
|
||||
EffectSounds.ding();
|
||||
}
|
||||
|
||||
if (data.level_up) {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</label>
|
||||
|
||||
<label>字色:
|
||||
<input type="color" id="font_color" name="font_color" value="{{ $user->s_color ?? '#000000' }}"
|
||||
<input type="color" id="font_color" name="font_color" value="{{ preg_match('/^#[0-9a-fA-F]{6}$/', (string) $user->s_color) ? $user->s_color : '#000000' }}"
|
||||
style="width: 22px; height: 18px; padding: 0; border: 1px solid navy; cursor: pointer;">
|
||||
</label>
|
||||
|
||||
|
||||
@@ -483,6 +483,7 @@
|
||||
},
|
||||
body: JSON.stringify({
|
||||
item_id: itemId,
|
||||
room_id: window.chatContext?.roomId ?? 0,
|
||||
recipient,
|
||||
message: message || '',
|
||||
quantity: quantity || 1
|
||||
|
||||
@@ -1045,6 +1045,7 @@
|
||||
$canKickUser = Auth::id() === 1 || (($roomPermissionMap[\App\Support\PositionPermissionRegistry::USER_KICK] ?? false) === true);
|
||||
$canMuteUser = Auth::id() === 1 || (($roomPermissionMap[\App\Support\PositionPermissionRegistry::USER_MUTE] ?? false) === true);
|
||||
$canFreezeUser = Auth::id() === 1 || (($roomPermissionMap[\App\Support\PositionPermissionRegistry::USER_FREEZE] ?? false) === true);
|
||||
$canRewardUser = Auth::id() === 1 || (($roomPermissionMap[\App\Support\PositionPermissionRegistry::ROOM_REWARD] ?? false) === true);
|
||||
$hasUserModerationPermission = $canWarnUser || $canKickUser || $canMuteUser || $canFreezeUser;
|
||||
$hasPositionActions = Auth::user()->activePosition || $myLevel >= $superLevel;
|
||||
@endphp
|
||||
@@ -1095,8 +1096,8 @@
|
||||
</button>
|
||||
@endif
|
||||
|
||||
{{-- 职务奖励金币(凭空产生),仅有在职职务且 max_reward != 0 的人可见 --}}
|
||||
@if ($hasPositionActions)
|
||||
{{-- 职务奖励金币(凭空产生),仅有明确奖励权限且 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)">💰 奖励金币
|
||||
|
||||
Reference in New Issue
Block a user