Feat: 优化自动存点通知样式,系统消息不显示头像,改为绿色左边框简洁条形
This commit is contained in:
@@ -218,7 +218,7 @@
|
||||
let timeStrOverride = false;
|
||||
|
||||
// 系统用户名列表(不可被选为聊天对象)
|
||||
const systemUsers = ['钓鱼播报', '星海小博士', '系统传音', '系统公告', 'AI小班长', '送花播报'];
|
||||
const systemUsers = ['钓鱼播报', '星海小博士', '系统传音', '系统公告', 'AI小班长', '送花播报', '系统'];
|
||||
// 用户名(单击切换发言对象,双击查看资料;系统用户仅显示文本)
|
||||
const clickableUser = (uName, color) => {
|
||||
if (systemUsers.includes(uName)) {
|
||||
@@ -249,6 +249,12 @@
|
||||
`<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 === '系统' && msg.to_user && msg.to_user !== '大家') {
|
||||
// 系统私人通知(自动存点等):无头像,绿色左边框简洁条形样式
|
||||
div.style.cssText =
|
||||
'background:#f0fdf4;border-left:3px solid #16a34a;border-radius:4px;padding:3px 8px;margin:2px 0;font-size:12px;';
|
||||
html =
|
||||
`<span style="color:#16a34a;font-weight:bold;">📢 系统:</span><span style="color:#15803d;">${msg.content}</span>`;
|
||||
} else {
|
||||
// 其他系统用户(钓鱼播报、送花播报、AI小班长等):普通样式
|
||||
let giftHtml = '';
|
||||
|
||||
Reference in New Issue
Block a user