mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-17 03:27:00 +08:00
- 新增微信账号发现、环境诊断和分步数据库连接引导 - 支持按账号安全保存数据库密钥及快速切换账号 - 完善 WCDB 历史消息分片读取和分页状态提示 - 支持导出图片、视频和语音,提供原图优先及缩略图回退 - 更新安装指引、兼容版本说明和相关自动化测试
23 lines
689 B
TypeScript
23 lines
689 B
TypeScript
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
|
|
}
|