mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-17 19:47:08 +08:00
feat: 完善多账号连接诊断与聊天媒体导出
- 新增微信账号发现、环境诊断和分步数据库连接引导 - 支持按账号安全保存数据库密钥及快速切换账号 - 完善 WCDB 历史消息分片读取和分页状态提示 - 支持导出图片、视频和语音,提供原图优先及缩略图回退 - 更新安装指引、兼容版本说明和相关自动化测试
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import type { ExportRequest } from './export'
|
||||
|
||||
export type ImageExportAttempt = {
|
||||
allowThumbnail: boolean
|
||||
preferThumbnail: boolean
|
||||
fallback: boolean
|
||||
}
|
||||
|
||||
export function getImageExportAttempts(
|
||||
request: Pick<ExportRequest, 'preferOriginal' | 'fallbackThumbnail'>
|
||||
): ImageExportAttempt[] {
|
||||
if (request.preferOriginal === false) {
|
||||
return [{ allowThumbnail: true, preferThumbnail: true, fallback: false }]
|
||||
}
|
||||
const attempts: ImageExportAttempt[] = [
|
||||
{ allowThumbnail: false, preferThumbnail: false, fallback: false }
|
||||
]
|
||||
if (request.fallbackThumbnail !== false) {
|
||||
attempts.push({ allowThumbnail: true, preferThumbnail: true, fallback: true })
|
||||
}
|
||||
return attempts
|
||||
}
|
||||
Reference in New Issue
Block a user