统一:所有图片后缀从 .GIF 改为 .gif

- headface 目录 371 个文件重命名为小写后缀
- 代码中所有 .GIF 引用改为 .gif(User.php/AuthController/channels.php/frame.blade/scripts.blade)
- 新增迁移:将 users 表 usersf 列中的 .GIF 批量替换为 .gif
- 解决 Linux 大小写敏感导致图片加载失败的问题
This commit is contained in:
2026-02-26 23:27:35 +08:00
parent a7af3e3e06
commit bfd90ca882
377 changed files with 44 additions and 11 deletions

View File

@@ -387,7 +387,7 @@
<div
style="padding:10px 16px; background:#f0f6ff; border-bottom:1px solid #ddd; display:flex; align-items:center; gap:12px;">
<span style="font-size:12px; color:#666;">当前选中:</span>
<img id="avatar-preview" src="/images/headface/{{ $user->usersf ?: '1.GIF' }}"
<img id="avatar-preview" src="/images/headface/{{ $user->usersf ?: '1.gif' }}"
style="width:40px; height:40px; border:2px solid #336699; border-radius:4px;">
<span id="avatar-selected-name"
style="font-size:12px; color:#333;">{{ $user->usersf ?: '未设置' }}</span>
@@ -540,7 +540,7 @@
email: document.getElementById('set-email').value,
question: document.getElementById('set-question').value,
answer: document.getElementById('set-answer').value,
headface: @json(Auth::user()->usersf ?: '1.GIF'),
headface: @json(Auth::user()->usersf ?: '1.gif'),
sign: @json(Auth::user()->sign ?? '')
};

View File

@@ -89,7 +89,7 @@
let botDiv = document.createElement('div');
botDiv.className = 'user-item';
botDiv.innerHTML = `
<img class="user-head" src="/images/headface/1.GIF" onerror="this.src='/images/headface/1.GIF'">
<img class="user-head" src="/images/headface/1.gif" onerror="this.src='/images/headface/1.gif'">
<span class="user-name">AI小助手</span><span style="font-size:12px; margin-left:2px;" title="聊天机器人">🤖</span>
`;
botDiv.onclick = () => {
@@ -132,7 +132,7 @@
item.className = 'user-item';
item.dataset.username = username;
const headface = user.headface || '1.GIF';
const headface = user.headface || '1.gif';
// VIP 图标和管理员标识
let badges = '';
if (user.vip_icon) {
@@ -147,7 +147,7 @@
// 女生名字使用玫粉色
const nameColor = (user.sex == 2) ? 'color:#e91e8c;' : '';
item.innerHTML = `
<img class="user-head" src="/images/headface/${headface}" onerror="this.src='/images/headface/1.GIF'">
<img class="user-head" src="/images/headface/${headface}" onerror="this.src='/images/headface/1.gif'">
<span class="user-name" style="${nameColor}">${username}</span>${badges}
`;
@@ -277,9 +277,9 @@
// 获取发言者头像
const senderInfo = onlineUsers[msg.from_user];
const senderHead = (senderInfo && senderInfo.headface) || '1.GIF';
const senderHead = (senderInfo && senderInfo.headface) || '1.gif';
const headImg =
`<img src="/images/headface/${senderHead}" style="display:inline;width:16px;height:16px;vertical-align:middle;margin-right:2px;" onerror="this.src='/images/headface/1.GIF'">`;
`<img src="/images/headface/${senderHead}" style="display:inline;width:16px;height:16px;vertical-align:middle;margin-right:2px;" onerror="this.src='/images/headface/1.gif'">`;
let html = '';