Header 状态改用 Checkstatus 查询并移除已发行

状态与 GetPrinterInfo 分离:启动仅拉色带/序列号,操作后通过 SAPI_PrinterCheckstatus 刷新状态文案。
This commit is contained in:
24kycj
2026-06-03 16:07:58 +08:00
parent 10bc05f498
commit 6b135eaf7a
8 changed files with 48 additions and 89 deletions
+1 -2
View File
@@ -104,8 +104,7 @@ export function registerIpcHandlers(): void {
const snapshot: PrinterStatusSnapshot = {
ribbonType: cached?.ribbonType ?? '—',
statusText: parsed.statusText,
serialNo: cached?.serialNo ?? '—',
printedCount: cached?.printedCount ?? 0
serialNo: cached?.serialNo ?? '—'
}
configStore.set('lastPrinterStatus', snapshot)
return ok({ statusText: parsed.statusText, statusCode: code })