Fix: 升级播报改为金色左边框轻量样式,与站长公告红框区分开
This commit is contained in:
@@ -170,7 +170,7 @@ class AutoSaveExp extends Command
|
||||
'room_id' => $roomId,
|
||||
'from_user' => '系统传音',
|
||||
'to_user' => '大家',
|
||||
'content' => "🌟 天道酬勤!恭喜侠客【{$user->username}】挂机苦修,境界突破至 LV.{$user->user_level}!",
|
||||
'content' => "天道酬勤!恭喜侠客【{$user->username}】挂机苦修,境界突破至 LV.{$user->user_level}!",
|
||||
'is_secret' => false,
|
||||
'font_color' => '#d97706',
|
||||
'action' => '大声宣告',
|
||||
|
||||
@@ -304,14 +304,19 @@
|
||||
|
||||
// 系统用户消息以醒目公告样式显示
|
||||
if (systemUsers.includes(msg.from_user)) {
|
||||
if (msg.from_user === '系统公告' || msg.from_user === '系统传音') {
|
||||
// 管理员公告/系统传音:大字醒目样式,时间跟在内容后面
|
||||
if (msg.from_user === '系统公告') {
|
||||
// 管理员公告:大字醒目红框样式
|
||||
div.style.cssText =
|
||||
'background: linear-gradient(135deg, #fef2f2, #fff1f2); border: 2px solid #ef4444; border-radius: 6px; padding: 8px 12px; margin: 4px 0; box-shadow: 0 2px 4px rgba(239,68,68,0.15);';
|
||||
html =
|
||||
`<div style="font-size: 14px; font-weight: bold; color: #dc2626;">${msg.content} <span style="font-size: 10px; color: #999; font-weight: normal;">(${timeStr})</span></div>`;
|
||||
// 由于我们把时间放进了特殊的结构里,这里把原有的外层时间置空,防止重复显示
|
||||
timeStrOverride = true;
|
||||
} else if (msg.from_user === '系统传音') {
|
||||
// 自动升级播报:金色左边框,轻量提示样式,不喧宾夺主
|
||||
div.style.cssText =
|
||||
'background: #fffbeb; border-left: 3px solid #d97706; border-radius: 4px; padding: 4px 10px; margin: 2px 0;';
|
||||
html =
|
||||
`<span style="color: #b45309; font-size: 12px;">🌟 ${msg.content}</span>`;
|
||||
} else if (msg.from_user === '系统' && msg.to_user && msg.to_user !== '大家') {
|
||||
// 系统私人通知(自动存点等):无头像,绿色左边框简洁条形样式
|
||||
div.style.cssText =
|
||||
|
||||
Reference in New Issue
Block a user