fix(UI): 使聊天记录中的 AI小班长 名称支持点击以快速回复
This commit is contained in:
@@ -521,6 +521,9 @@
|
||||
|
||||
// 用户名(单击切换发言对象,双击查看资料;系统用户或游戏标签仅显示文本)
|
||||
const clickableUser = (uName, color) => {
|
||||
if (uName === 'AI小班长') {
|
||||
return `<span class="msg-user" data-u="${uName}" style="color: ${color}; cursor: pointer;" onclick="switchTarget('${uName}')">${uName}</span>`;
|
||||
}
|
||||
if (systemUsers.includes(uName) || isGameLabel(uName)) {
|
||||
return `<span class="msg-user" style="color: ${color};">${uName}</span>`;
|
||||
}
|
||||
@@ -617,7 +620,7 @@
|
||||
});
|
||||
|
||||
html =
|
||||
`${headImg}<span class="msg-user" style="color: ${fontColor}; font-weight: bold;">${msg.from_user}:</span><span class="msg-content" style="color: ${fontColor}">${parsedContent}</span>${giftHtml}`;
|
||||
`${headImg}<span style="font-weight: bold;">${clickableUser(msg.from_user, fontColor)}:</span><span class="msg-content" style="color: ${fontColor}">${parsedContent}</span>${giftHtml}`;
|
||||
}
|
||||
} else if (msg.is_secret) {
|
||||
if (msg.from_user === '系统') {
|
||||
|
||||
Reference in New Issue
Block a user