优化:系统公告/传音消息以大字醒目样式显示

- 红色渐变边框背景、14px大字、阴影效果
- 钓鱼播报/AI小助手等保持普通样式
This commit is contained in:
2026-02-26 22:34:00 +08:00
parent 928e613b1b
commit 5722d5be25

View File

@@ -281,10 +281,18 @@
let html = '';
// 系统用户消息直接显示为公告(不显示「对大家说:」)
// 系统用户消息以醒目公告样式显示
if (systemUsers.includes(msg.from_user)) {
html =
`${headImg}<span class="msg-user" style="color: ${fontColor}; font-weight: bold;">${msg.from_user}</span><span class="msg-content" style="color: ${fontColor}">${msg.content}</span>`;
if (msg.from_user === '系统公告' || 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}</div>`;
} else {
// 其他系统用户钓鱼播报、AI小助手等普通样式
html =
`${headImg}<span class="msg-user" style="color: ${fontColor}; font-weight: bold;">${msg.from_user}</span><span class="msg-content" style="color: ${fontColor}">${msg.content}</span>`;
}
} else if (msg.is_secret) {
// 悄悄话样式(原版:紫色斜体)
html =