fix(ocr): clear document placeholder after load
Some checks failed
Desktop Release / Bootstrap updater signing key (push) Has been cancelled
Desktop Release / Windows x64 NSIS (push) Has been cancelled
Desktop Release / Linux x64 DEB + AppImage (push) Has been cancelled
Desktop Release / Publish public desktop release (push) Has been cancelled

This commit is contained in:
Admin 2026-09-25 23:52:14 +00:00
parent 697ad5575f
commit 91b155aa49
6 changed files with 17 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@fieldlens/print", "name": "@fieldlens/print",
"version": "0.1.24", "version": "0.1.25",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {

View File

@ -1,6 +1,6 @@
[package] [package]
name = "fieldlens-print" name = "fieldlens-print"
version = "0.1.24" version = "0.1.25"
description = "FieldLens print-stream barcode capture companion" description = "FieldLens print-stream barcode capture companion"
authors = ["Arrowstack"] authors = ["Arrowstack"]
edition = "2021" edition = "2021"

View File

@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "FieldLens Print", "productName": "FieldLens Print",
"version": "0.1.24", "version": "0.1.25",
"identifier": "dev.arrowstack.fieldlens.print", "identifier": "dev.arrowstack.fieldlens.print",
"build": { "build": {
"beforeDevCommand": "npm run dev", "beforeDevCommand": "npm run dev",

View File

@ -142,7 +142,7 @@ let config: AppConfig
let jobs: Job[] = [] let jobs: Job[] = []
let status: Status = { running: false, mode: 'raw-proxy', pending: 0, jobs: 0 } let status: Status = { running: false, mode: 'raw-proxy', pending: 0, jobs: 0 }
let loginTimer: number | undefined let loginTimer: number | undefined
let currentVersion = '0.1.24' let currentVersion = '0.1.25'
let bundleType: BundleType | null = null let bundleType: BundleType | null = null
let availableUpdate: Update | null = null let availableUpdate: Update | null = null
let availableManualUpdate: ManualUpdate | null = null let availableManualUpdate: ManualUpdate | null = null

View File

@ -392,8 +392,15 @@ export function initOcrRefinement(root: HTMLElement) {
} }
byId('ocr-document-name').textContent = name byId('ocr-document-name').textContent = name
setStatus('Document loaded. Draw or adjust target regions.') // Hide the empty-state as soon as a valid document has been accepted.
// Windows WebView can otherwise leave the placeholder visible while the
// PDF/image render completes.
previewEmpty.hidden = true
previewEmpty.setAttribute('aria-hidden', 'true')
pageFrame.hidden = true
setStatus('Rendering ' + name + '…')
await renderDocument() await renderDocument()
setStatus('Document loaded. Draw or adjust target regions.')
} }
function overlayPoint(event: PointerEvent) { function overlayPoint(event: PointerEvent) {

View File

@ -952,6 +952,11 @@ select:focus {
#0f151d; #0f151d;
} }
.ocr-preview-empty[hidden],
.ocr-page-frame[hidden] {
display: none !important;
}
.ocr-preview-empty { .ocr-preview-empty {
min-height: 480px; min-height: 480px;
display: grid; display: grid;