UI: 恢复公告时间戳内联显示,附在内容正后方
This commit is contained in:
@@ -242,12 +242,11 @@
|
|||||||
// 系统用户消息以醒目公告样式显示
|
// 系统用户消息以醒目公告样式显示
|
||||||
if (systemUsers.includes(msg.from_user)) {
|
if (systemUsers.includes(msg.from_user)) {
|
||||||
if (msg.from_user === '系统公告' || msg.from_user === '系统传音') {
|
if (msg.from_user === '系统公告' || msg.from_user === '系统传音') {
|
||||||
// 管理员公告/系统传音:大字醒目样式,时间右下角对齐
|
// 管理员公告/系统传音:大字醒目样式,时间跟在内容后面
|
||||||
div.style.cssText =
|
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); display: flex; flex-direction: column; gap: 8px;';
|
'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 =
|
html =
|
||||||
`<div style="font-size: 14px; font-weight: bold; color: #dc2626;">${msg.content}</div>
|
`<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-size: 10px; color: #999; text-align: right; align-self: flex-end;">(${timeStr})</div>`;
|
|
||||||
// 由于我们把时间放进了特殊的结构里,这里把原有的外层时间置空,防止重复显示
|
// 由于我们把时间放进了特殊的结构里,这里把原有的外层时间置空,防止重复显示
|
||||||
timeStrOverride = true;
|
timeStrOverride = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user