mirror of
https://github.com/zadam/trilium.git
synced 2025-12-05 06:54:23 +01:00
chore(ocr): improve ocr search result style
This commit is contained in:
parent
65b58c3668
commit
55ac1e01f2
@ -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>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user