diff --git a/js/history/history.js b/js/history/history.js index ecc5d6d..626a173 100644 --- a/js/history/history.js +++ b/js/history/history.js @@ -71,10 +71,10 @@ document.addEventListener('DOMContentLoaded', function() { const timeStr = `${timeObj.getMonth() + 1}/${timeObj.getDate()} ${String(timeObj.getHours()).padStart(2, '0')}:${String(timeObj.getMinutes()).padStart(2, '0')}`; return ` -
+
${name} - ${timeStr} + ${timeStr}
`; }).join(''); @@ -854,18 +854,18 @@ document.addEventListener('DOMContentLoaded', function() { function renderFolderListItem({ id, name, count, system }) { const isActive = historyUIState.activeFolder === id; - const baseClasses = 'group flex items-center justify-between px-2 py-1.5 rounded-lg border transition-colors'; - const activeClasses = isActive ? 'border-blue-200 bg-blue-50 text-blue-600' : 'border-transparent hover:bg-gray-100 text-gray-700'; + const baseClasses = 'group flex items-center justify-between px-2 py-1.5 rounded-[5px] border transition-colors'; + const activeClasses = isActive ? ' bg-[#E4E6EA] text-[#000F33]' : 'border-transparent hover:bg-gray-100 text-[#666666]'; const title = escapeAttr(name || '未命名'); const countBadge = `${typeof count === 'number' ? count : 0}`; const selectButton = ` - `; const actionButtons = system ? '' : `
- `; const downloadBtnHtml = ` `; const recordDisplayName = record.name || relativePathLabel || record.id || '历史记录'; const escapedRecordNameAttr = escapeAttr(recordDisplayName); const deleteBtnHtml = withinBatch ? '' : ` `; const startReadingBtnHtml = ` - `; const containerClasses = withinBatch - ? 'border border-slate-200 rounded-xl p-3 bg-white shadow-sm hover:border-blue-200 transition' - : 'border border-slate-200 rounded-xl p-4 bg-white shadow-sm hover:border-blue-200 hover:shadow-md transition'; + ? 'rounded-[20px] p-3 bg-[#F8F9FA] hover:border-blue-200 transition' + : 'rounded-[20px] p-4 bg-[#F8F9FA] hover:border-blue-200 transition'; return `
-
+
${escapeHtml(record.name || '未命名')} ${statusBadge}
-
- ${timeLabel}${targetLang ? ` · 语言:${escapeHtml(targetLang)}` : ''} -
+ ${(ocrLabel || (transLabel && transLabel !== '未翻译')) ? `
${ocrLabel ? `OCR:${ocrLabel}` : ''} @@ -1269,7 +1266,6 @@ document.addEventListener('DOMContentLoaded', function() {
@@ -1282,7 +1278,6 @@ document.addEventListener('DOMContentLoaded', function() {
${exportBtnHtml} - ${startReadingBtnHtml} ${downloadBtnHtml} ${deleteBtnHtml}
@@ -1290,10 +1285,16 @@ document.addEventListener('DOMContentLoaded', function() {
OCR:${ocrSnippet}
翻译:${translationSnippet}
-
+
+
+ ${timeLabel}${targetLang ? ` · 语言:${escapeHtml(targetLang)}` : ''} +
+
+ ${startReadingBtnHtml} +
${renderExportConfigPanel({ id: configId, @@ -1501,22 +1502,22 @@ document.addEventListener('DOMContentLoaded', function() { function buildStatusBadge(status) { if (!status || status.total === 0) { - return '未分块'; + return '未分块'; } // 若没有任何成功块(0/total),改为“预览中,无翻译块” if (status.success === 0) { // 结构化翻译下,将提示文案替换为“PDF对照” if (status.isStructured) { - return 'PDF对照'; + return 'PDF对照'; } - return '预览中,无翻译块'; + return '预览中,无翻译块'; } // 有成功也有失败 → 部分失败 if (status.failed > 0) { - return `部分失败 ${status.success}/${status.total}`; + return `部分失败 ${status.success}/${status.total}`; } // 全部成功 - return `完成 ${status.success}/${status.total}`; + return `完成 ${status.success}/${status.total}`; } function buildSnippetText(text) {