feat(plugin): add 重做OCR button to global and collection dashboard

This commit is contained in:
Research Assistant 2026-06-01 13:23:50 +08:00
parent d089a53441
commit 5f073c8c09

View file

@ -798,6 +798,13 @@ export class PaperForgeStatusView extends ItemView {
globalStatusBtn.addEventListener('click', () => {
this._fetchStats(false);
});
const globalRedoBtn = btnsRow.createEl('button', { cls: 'paperforge-contextual-btn warn' });
globalRedoBtn.createEl('span', { cls: 'paperforge-contextual-btn-icon', text: '\u21BA' });
globalRedoBtn.createEl('span', { text: '\u91CD\u505AOCR' });
globalRedoBtn.addEventListener('click', () => {
const action = ACTIONS.find(a => a.id === 'paperforge-ocr-redo');
if (action) this._runAction(action, globalRedoBtn);
});
const globalRepairBtn = btnsRow.createEl('button', { cls: 'paperforge-contextual-btn' });
globalRepairBtn.createEl('span', { cls: 'paperforge-contextual-btn-icon', text: '\u21BA' });
globalRepairBtn.createEl('span', { text: 'Repair Issues' });
@ -1254,6 +1261,13 @@ export class PaperForgeStatusView extends ItemView {
const action = ACTIONS.find(a => a.id === 'paperforge-sync');
if (action) this._runAction(action, syncBtn);
});
const redoBtn = actionsRow.createEl('button', { cls: 'paperforge-contextual-btn warn' });
redoBtn.createEl('span', { cls: 'paperforge-contextual-btn-icon', text: '\u21BA' });
redoBtn.createEl('span', { text: '\u91CD\u505AOCR' });
redoBtn.addEventListener('click', () => {
const action = ACTIONS.find(a => a.id === 'paperforge-ocr-redo');
if (action) this._runAction(action, redoBtn);
});
}
/* ── Refresh current mode (called on index change, D-09, REFR-01) ── */