chore(ocr): improve ocr search result style

This commit is contained in:
Elian Doran 2025-07-26 14:15:45 +03:00
parent 65b58c3668
commit 55ac1e01f2
No known key found for this signature in database
2 changed files with 27 additions and 4 deletions

View File

@ -188,11 +188,11 @@ async function addOCRTextIfAvailable(note: FNote, $content: JQuery<HTMLElement>)
const data = await response.json(); const data = await response.json();
if (data.success && data.hasOcr && data.text) { if (data.success && data.hasOcr && data.text) {
const $ocrSection = $(` const $ocrSection = $(`
<div class="ocr-text-section" style="margin: 10px 0; padding: 10px; background: var(--accented-background-color); border-radius: 5px; border-left: 3px solid var(--main-text-color);"> <div class="ocr-text-section">
<div class="ocr-header" style="font-weight: bold; margin-bottom: 8px; font-size: 0.9em; color: var(--muted-text-color);"> <div class="ocr-header">
<span class="bx bx-text"></span> ${t("ocr.extracted_text")} <span class="bx bx-text"></span> ${t("ocr.extracted_text")}
</div> </div>
<div class="ocr-content" style="max-height: 150px; overflow-y: auto; font-size: 0.9em; line-height: 1.4; white-space: pre-wrap;"></div> <div class="ocr-content"></div>
</div> </div>
`); `);

View File

@ -2201,3 +2201,26 @@ footer.file-footer button {
content: "\ec24"; content: "\ec24";
transform: rotate(180deg); 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;
}