mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-17 03:27:00 +08:00
refactor(image-decrypt): 设置面板 UI 重构 + 测试步骤联动
页面拆分两个目录语义: - 上方「图片解密状态」的「图片资源目录」始终等于 chat 实时识别的默认目录(chat.getCurrentAccountRoot()), 不再被用户输入覆盖。 - 下方「图片密钥管理」移除「图片资源目录」输入框,只保留 XOR / AES 两个 Key。 该字段之前会被保存但实际不影响图片解密(数据库查询走默认根目录),保留只会让用户困惑。 UI 改动: - ImageKeyConfiguration:移除 resourceRoot 输入框,edit() 签名收窄为 xorKey | aesKey。 - ImageTestSection:测试结果由 3 列横排改为步骤条样式(pending / ok / fail / skipped), 任意一步 ✗ 后续步骤自动标记「跳过」并灰掉,前端语义上变成「要么都成功要么都失败」。 - AutoDetectImageKeySection:加一行小字提示「仅支持 WeChat 4.0,V3 及以下无法解析」。 后端改动: - testImageDecryption:解密失败时把 fileFound/decrypted/readable 统一置 false, 拆出「解密成功但不可读」中间态,让 UI 步骤联动准确反映。 - inspectImageDecryptionStatus:accountRoot 兜底改为 getCurrentAccountRoot() || config.resourceRoot, 让状态面板始终显示当前识别到的默认目录。 - sanitizeImageError:把 'no_image_message' / '300' / 'unsupported' / 'dat version' 关键字翻译成具体提示。 - useImageDecryptionController.autoDetect:错误信息原文透传,不再走 sanitizeImageError(后者会 把扫描阶段的「未找到 V2 模板文件」/「60 秒未找到 AES 密钥」等归类成「无法解析媒体文件」,掩盖真因)。 - image-key-config-service.save():不再写回 imageKeyRoot,下方输入框只用于校验,不再落盘。
This commit is contained in:
@@ -5791,6 +5791,59 @@ body {
|
||||
width: 100%;
|
||||
margin: 2px 0 0;
|
||||
}
|
||||
.image-step-list {
|
||||
list-style: none;
|
||||
margin: 14px 0 0;
|
||||
padding: 12px 14px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e5ecea;
|
||||
background: #f7faf9;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.image-step {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.image-step-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.image-step-ok .image-step-icon {
|
||||
background: #2e765d;
|
||||
color: #fff;
|
||||
}
|
||||
.image-step-fail .image-step-icon {
|
||||
background: #a84444;
|
||||
color: #fff;
|
||||
}
|
||||
.image-step-fail span:last-child {
|
||||
color: #a84444;
|
||||
}
|
||||
.image-step-pending .image-step-icon {
|
||||
background: #d6dde0;
|
||||
color: #6a7378;
|
||||
}
|
||||
.image-step-pending span:last-child {
|
||||
color: #98a1a4;
|
||||
}
|
||||
.image-step-skipped .image-step-icon {
|
||||
background: transparent;
|
||||
color: #b8c0c4;
|
||||
}
|
||||
.image-step-skipped span:last-child {
|
||||
color: #b8c0c4;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.image-inline-error {
|
||||
margin: 14px 0 0;
|
||||
color: #a84444;
|
||||
@@ -5829,6 +5882,12 @@ body {
|
||||
border-radius: 7px;
|
||||
background: #f1f4f3;
|
||||
}
|
||||
.image-auto-scope-hint {
|
||||
display: inline-block;
|
||||
margin-top: 4px;
|
||||
color: #7d8c8a;
|
||||
font-size: 11px;
|
||||
}
|
||||
.image-auto-unavailable {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
|
||||
Reference in New Issue
Block a user