mirror of
https://github.com/zadam/trilium.git
synced 2025-12-04 22:44:25 +01:00
chore(ocr): improve ocr search result style
This commit is contained in:
parent
65b58c3668
commit
55ac1e01f2
@ -188,14 +188,14 @@ async function addOCRTextIfAvailable(note: FNote, $content: JQuery<HTMLElement>)
|
||||
const data = await response.json();
|
||||
if (data.success && data.hasOcr && data.text) {
|
||||
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-header" style="font-weight: bold; margin-bottom: 8px; font-size: 0.9em; color: var(--muted-text-color);">
|
||||
<div class="ocr-text-section">
|
||||
<div class="ocr-header">
|
||||
<span class="bx bx-text"></span> ${t("ocr.extracted_text")}
|
||||
</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>
|
||||
`);
|
||||
|
||||
|
||||
$ocrSection.find('.ocr-content').text(data.text);
|
||||
$content.append($ocrSection);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user