UI:聊天消息移除硬编码 font-size,统一继承用户设置的字体大小
This commit is contained in:
@@ -313,18 +313,18 @@
|
||||
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>`;
|
||||
`<div style="font-weight: bold; color: #dc2626;">${msg.content} <span style="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>`;
|
||||
`<span style="color: #b45309;">🌟 ${msg.content}</span>`;
|
||||
} 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;';
|
||||
'background:#f0fdf4;border-left:3px solid #16a34a;border-radius:4px;padding:3px 8px;margin:2px 0;';
|
||||
html =
|
||||
`<span style="color:#16a34a;font-weight:bold;">📢 系统:</span><span style="color:#15803d;">${msg.content}</span>`;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user