diff --git a/apps/client/src/services/content_renderer.ts b/apps/client/src/services/content_renderer.ts index 8457cbfed..da6609e56 100644 --- a/apps/client/src/services/content_renderer.ts +++ b/apps/client/src/services/content_renderer.ts @@ -188,14 +188,14 @@ async function addOCRTextIfAvailable(note: FNote, $content: JQuery) const data = await response.json(); if (data.success && data.hasOcr && data.text) { const $ocrSection = $(` -
-
+
+
${t("ocr.extracted_text")}
-
+
`); - + $ocrSection.find('.ocr-content').text(data.text); $content.append($ocrSection); } diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css index 2296166f2..ff49fbe38 100644 --- a/apps/client/src/stylesheets/style.css +++ b/apps/client/src/stylesheets/style.css @@ -2201,3 +2201,26 @@ footer.file-footer button { content: "\ec24"; transform: rotate(180deg); } + +.ocr-text-section { + margin: 10px 0; + padding: 10px; + background: var(--accented-background-color); + border-left: 3px solid var(--main-border-color); + text-align: left; +} + +.ocr-header { + font-weight: bold; + margin-bottom: 8px; + font-size: 0.9em; + color: var(--muted-text-color); +} + +.ocr-content { + max-height: 150px; + overflow-y: auto; + font-size: 0.9em; + line-height: 1.4; + white-space: pre-wrap; +} \ No newline at end of file