feat: 删除了一些多余toast

This commit is contained in:
SuperManTouX 2026-03-11 14:31:39 +08:00
parent 0f531d1b91
commit bfe00cc98f
1 changed files with 0 additions and 7 deletions

View File

@ -466,15 +466,11 @@ async function triggerReprocess(includeTranslation) {
return; return;
} }
// 显示处理中 Toast
showToast('正在准备文档...', 'info');
try { try {
// 将 Base64 转为 File 对象 // 将 Base64 转为 File 对象
const file = base64ToFile(pdfBase64, docName); const file = base64ToFile(pdfBase64, docName);
// 执行 OCR
showToast('正在进行 OCR 识别...', 'info');
const ocrResult = await performOcr(file, (current, total, msg) => { const ocrResult = await performOcr(file, (current, total, msg) => {
showToast(`${msg || 'OCR 处理中'} (${current}/${total})`, 'info', 5000); showToast(`${msg || 'OCR 处理中'} (${current}/${total})`, 'info', 5000);
@ -493,7 +489,6 @@ async function triggerReprocess(includeTranslation) {
// 如果需要翻译,执行翻译 // 如果需要翻译,执行翻译
if (includeTranslation) { if (includeTranslation) {
showToast('正在进行翻译...', 'info');
try { try {
const translationResult = await performTranslation(ocrResult.markdown, (current, total, msg) => { const translationResult = await performTranslation(ocrResult.markdown, (current, total, msg) => {
@ -515,7 +510,6 @@ async function triggerReprocess(includeTranslation) {
} }
// 保存到 IndexedDB // 保存到 IndexedDB
showToast('正在保存...', 'info');
await saveResultToDB(window.data); await saveResultToDB(window.data);
// 刷新页面显示 // 刷新页面显示
@ -710,7 +704,6 @@ async function triggerReprocessWithMinerU() {
const savedMineruMode = localStorage.getItem('mineruMode'); const savedMineruMode = localStorage.getItem('mineruMode');
try { try {
showToast('正在使用 MinerU 处理文档...', 'info');
// 临时设置 OCR 配置为 MinerU + 结构化翻译模式 // 临时设置 OCR 配置为 MinerU + 结构化翻译模式
localStorage.setItem('ocrEngine', 'mineru'); localStorage.setItem('ocrEngine', 'mineru');