From f5f33e07448a82bf78fa00d95934feec396d3439 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 19 Oct 2026 22:06:11 -0700 Subject: [PATCH] make the ui usable --- ...r-template-editor-zone-list.component.html | 2 +- .../ocr-template-editor.component.html | 302 ++++++++++-------- .../ocr-template-editor.component.scss | 32 +- .../ocr-template-editor.component.spec.ts | 261 +++++++++++++++ .../ocr-template-editor.component.ts | 291 ++++++++++++----- src-ui/src/main.ts | 2 + 6 files changed, 664 insertions(+), 226 deletions(-) create mode 100644 src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.spec.ts diff --git a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor-zone-list/ocr-template-editor-zone-list.component.html b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor-zone-list/ocr-template-editor-zone-list.component.html index 67f2f6eb8..34c337ed1 100644 --- a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor-zone-list/ocr-template-editor-zone-list.component.html +++ b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor-zone-list/ocr-template-editor-zone-list.component.html @@ -1,6 +1,6 @@ @if (zones.length === 0) {

- No zones defined. Load a document preview and draw rectangles to add zones. + No zones defined.

} diff --git a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.html b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.html index da05f2c4e..a796966ae 100644 --- a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.html +++ b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.html @@ -1,60 +1,57 @@ -
-
- -
- + +
+ + -
- -
-
-
Page
- -
of {{previewPageCount}}
+ @if (previewDocId) { + + }
- - - -
- - {{ zoom * 100 | number: '1.0-0' }}% - + + {{ documentFormatter(document) }} + +
+ @switch (searchStatus()) { + @case ('loading') { Searching... } + @case ('empty') { No matching documents. } + @case ('error') { Document search failed. } + }
-
-
- -
- -
+
+
+ + + +