Feat: 系统播报用户头像改为像素军号图标(钓鱼播报/星海小博士/送花播报等)
This commit is contained in:
BIN
public/images/bugle.png
Normal file
BIN
public/images/bugle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 311 KiB |
@@ -290,12 +290,15 @@
|
||||
return `<span class="msg-user" style="color: ${color}; cursor: pointer;" onclick="switchTarget('${uName}')" ondblclick="openUserCard('${uName}')">${uName}</span>`;
|
||||
};
|
||||
|
||||
// 获取发言者头像
|
||||
// 系统播报用户(不包含 AI小班长)使用军号图标,AI小班长用专属图,普通用户用头像
|
||||
const buggleUsers = ['钓鱼播报', '星海小博士', '送花播报', '系统传音', '系统公告'];
|
||||
const senderInfo = onlineUsers[msg.from_user];
|
||||
const senderHead = ((senderInfo && senderInfo.headface) || '1.gif').toLowerCase();
|
||||
let headImgSrc = `/images/headface/${senderHead}`;
|
||||
if (msg.from_user === 'AI小班长') {
|
||||
headImgSrc = '/images/ai_bot.png';
|
||||
} else if (buggleUsers.includes(msg.from_user)) {
|
||||
headImgSrc = '/images/bugle.png';
|
||||
}
|
||||
const headImg =
|
||||
`<img src="${headImgSrc}" style="display:inline;width:16px;height:16px;vertical-align:middle;margin-right:2px;mix-blend-mode: multiply;" onerror="this.src='/images/headface/1.gif'">`;
|
||||
|
||||
Reference in New Issue
Block a user