fix: 修复媒体导出与 HTML 聊天档案体验

- 修复打包版图片、语音解析不可用,内置 FFmpeg 与必要运行时依赖
- 修复 HTML 导出原图查找、缩略图回退及增量档案媒体解析问题
- 修复本人昵称在软件和 HTML 导出中显示为微信号的问题,并兼容旧档案昵称迁移
- 修复 HTML 语音播放器超出消息气泡的问题
- 优化 HTML 双向滚动加载,大量消息时最多渲染 240 条,避免页面卡顿
- 移除图片解密页面中手动配置 FFmpeg 的相关提示
- 补充图片解密、语音运行时、打包资源和 HTML 导出相关测试
This commit is contained in:
Wxw-Gu
2026-08-04 17:03:07 +08:00
parent c6587c517a
commit 0a3d930298
24 changed files with 949 additions and 515 deletions
+8 -5
View File
@@ -84,6 +84,7 @@ import {
getCachedMessages,
mergeBootstrapAvatars,
mergeCachedContactAvatars,
mergeCachedSelfInfo,
saveBootstrapContacts,
saveBootstrapSelf,
saveCachedGroupSnapshot,
@@ -1221,9 +1222,10 @@ app.whenReady().then(async () => {
}
})
ipcMain.handle('settings:getSelf', () => {
const info = chat.getSelfAccountInfo()
if (!info) return { ready: false }
ipcMain.handle('settings:getSelf', async () => {
const rawInfo = await chat.getSelfAccountInfoAsync()
if (!rawInfo) return { ready: false }
const info = mergeCachedSelfInfo(rawInfo.accountRoot, rawInfo)
if (chat.isReady()) saveBootstrapSelf(chat.getCurrentAccountRoot(), info)
return { ready: true, info }
})
@@ -1232,7 +1234,7 @@ app.whenReady().then(async () => {
return chat.testConnection(key, accountRoot)
})
ipcMain.handle('db:reopenWithRoot', (_, accountRoot: string) => {
ipcMain.handle('db:reopenWithRoot', async (_, accountRoot: string) => {
const ok = chat.reopenWithRoot(accountRoot)
if (!ok) return { success: false, error: '数据库未初始化或重新打开失败' }
// 同步 imageKeyRoot,避免自动获取扫描到旧目录
@@ -1240,7 +1242,8 @@ app.whenReady().then(async () => {
if (accountRoot && accountRoot !== settings.imageKeyRoot) {
saveSettings({ ...settings, imageKeyRoot: accountRoot })
}
const info = chat.getSelfAccountInfo()
const rawInfo = await chat.getSelfAccountInfoAsync()
const info = rawInfo ? mergeCachedSelfInfo(rawInfo.accountRoot, rawInfo) : null
return { success: true, info }
})