From 5f073c8c095580d4858e383ecff98ba28c4dc4f5 Mon Sep 17 00:00:00 2001 From: Research Assistant Date: Mon, 1 Jun 2026 13:23:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(plugin):=20add=20=E9=87=8D=E5=81=9AOCR=20b?= =?UTF-8?q?utton=20to=20global=20and=20collection=20dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- paperforge/plugin/src/views/dashboard.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/paperforge/plugin/src/views/dashboard.ts b/paperforge/plugin/src/views/dashboard.ts index 8708671b..1fd2aa55 100644 --- a/paperforge/plugin/src/views/dashboard.ts +++ b/paperforge/plugin/src/views/dashboard.ts @@ -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) ── */