Enhance metadata display and refine item readiness status in LibraryManager
This commit is contained in:
@@ -13,13 +13,18 @@ function itemSyncMeta(item) {
|
||||
const progress = Math.max(0, Math.min(100, Number(sync.progress) || 0))
|
||||
const detail = String(sync.detail || '').trim()
|
||||
const enrichEnabled = !!item?.enrich_enabled
|
||||
const metadataReady = ['ready', 'fallback'].includes(item?.metadata?.status)
|
||||
|
||||
if (status === 'ready') {
|
||||
return {
|
||||
status,
|
||||
progress: 100,
|
||||
label: 'Available',
|
||||
detail: detail || (enrichEnabled ? 'Ready with standard metadata and deep enrichment.' : 'Ready with standard metadata.')
|
||||
detail: detail || (
|
||||
metadataReady
|
||||
? (enrichEnabled ? 'Ready with standard metadata and deep enrichment.' : 'Ready with standard metadata.')
|
||||
: 'Ready for chat. Automatic metadata has not been generated yet.'
|
||||
)
|
||||
}
|
||||
}
|
||||
if (status === 'failed') {
|
||||
|
||||
@@ -1874,6 +1874,51 @@ input:checked + .slider:before {
|
||||
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
||||
}
|
||||
|
||||
.library-item-metadata {
|
||||
margin-top: 10px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
|
||||
}
|
||||
|
||||
.library-item-metadata p {
|
||||
display: -webkit-box;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
color: color-mix(in srgb, var(--text) 88%, var(--muted));
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 4;
|
||||
}
|
||||
|
||||
.library-metadata-chips,
|
||||
.library-metadata-entities {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.library-metadata-chips span {
|
||||
padding: 3px 7px;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
||||
color: var(--text);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.library-metadata-entities span {
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.library-metadata-warning {
|
||||
margin-top: 8px;
|
||||
color: #d6a75f;
|
||||
font-size: 11px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.library-file-path,
|
||||
.muted-copy {
|
||||
color: var(--muted);
|
||||
|
||||
Reference in New Issue
Block a user