fix docker issue
This commit is contained in:
@@ -2141,13 +2141,6 @@
|
||||
queue.innerHTML = `
|
||||
<div style="display:flex; flex-direction:column; gap:6px;">
|
||||
${ocrFiles.map((item, i) => {
|
||||
const keywords = (item.result && item.result.tags) ? item.result.tags : [];
|
||||
const kwHtml = keywords.length > 0
|
||||
? `<div style="display:flex; flex-wrap:wrap; gap:4px; margin-top:4px;">${keywords.map(k => `<span style="display:inline-block; padding:1px 8px; background:#e8f4fd; color:#0071e3; border-radius:980px; font-size:11px;">${escapeHtml(k)}</span>`).join('')}</div>`
|
||||
: '';
|
||||
const storyHtml = (item.result && item.result.story_summary)
|
||||
? `<p style="font-size:12px; color:#6e6e73; margin-top:2px; font-style:italic;">${escapeHtml(item.result.story_summary)}</p>`
|
||||
: '';
|
||||
return `
|
||||
<div style="padding:8px 12px; background:#f5f5f7; border-radius:10px;">
|
||||
<div style="display:flex; align-items:center; gap:10px;">
|
||||
@@ -2490,7 +2483,6 @@
|
||||
路径: ${escapeHtml(result.file_path || '')}
|
||||
</p>
|
||||
${imgHtml}
|
||||
${result.story_summary ? `<div style="background:#f0f5ff; border-radius:10px; padding:12px; margin-bottom:12px; border-left:3px solid #0071e3;"><p style="font-size:13px; color:#1d1d1f; margin:0; font-weight:500;">故事摘要</p><p style="font-size:13px; color:#424245; margin:4px 0 0 0; line-height:1.5;">${escapeHtml(result.story_summary)}</p></div>` : ''}
|
||||
<div style="background:#f5f5f7; border-radius:12px; padding:16px; max-height:300px; overflow-y:auto;">
|
||||
<pre style="white-space:pre-wrap; font-size:14px; color:#424245; line-height:1.6; font-family:inherit; margin:0;">${escapeHtml(result.ocr_text || '无识别结果')}</pre>
|
||||
</div>
|
||||
@@ -2541,13 +2533,6 @@
|
||||
}
|
||||
} else if (data.type === 'result') {
|
||||
foundCount++;
|
||||
const tagsHtml = (tags) => {
|
||||
if (!tags || tags.length === 0) return '';
|
||||
return '<div style="display:flex; flex-wrap:wrap; gap:4px; margin-top:4px;">' +
|
||||
tags.map(t => `<span style="display:inline-block; padding:2px 8px; border-radius:12px; font-size:11px; background:rgba(0,122,255,0.1); color:#007aff; white-space:nowrap;">${escapeHtml(t)}</span>`).join('') +
|
||||
'</div>';
|
||||
};
|
||||
|
||||
const itemHtml = `
|
||||
<div style="background:#f5f5f7; border-radius:10px; padding:12px; cursor:pointer; animation:fadeIn 0.3s;" onclick="viewOcrResult(${data.id})">
|
||||
<div style="display:flex; align-items:center; gap:8px; margin-bottom:4px;">
|
||||
@@ -2555,7 +2540,6 @@
|
||||
<span style="font-size:12px; color:#86868b;">#${foundCount}</span>
|
||||
</div>
|
||||
<p style="font-size:13px; color:#86868b;">${escapeHtml(data.ocr_text_preview || '')}</p>
|
||||
${tagsHtml(data.tags)}
|
||||
</div>`;
|
||||
|
||||
const itemsContainer = document.getElementById('ocr-search-items');
|
||||
|
||||
Reference in New Issue
Block a user