diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 321477d..f663efe 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -164,6 +164,7 @@ export default function App() { entries={entries} selectedEntryUid={selectedEntryUid} onSelectEntry={selectEntry} + archiveId={archiveId} tagFilter={tagFilter} onClearTagFilter={handleClearTagFilter} searchQuery={searchQuery} diff --git a/frontend/src/components/EntriesView.jsx b/frontend/src/components/EntriesView.jsx index 72e47f9..5fab831 100644 --- a/frontend/src/components/EntriesView.jsx +++ b/frontend/src/components/EntriesView.jsx @@ -1,6 +1,6 @@ import EntryRow from './EntryRow'; -export default function EntriesView({ entries, selectedEntryUid, onSelectEntry }) { +export default function EntriesView({ entries, selectedEntryUid, onSelectEntry, archiveId }) { return (
@@ -16,6 +16,7 @@ export default function EntriesView({ entries, selectedEntryUid, onSelectEntry } onSelectEntry(entry)} /> diff --git a/frontend/src/components/EntryRow.jsx b/frontend/src/components/EntryRow.jsx index b5dc03c..bbbbe3b 100644 --- a/frontend/src/components/EntryRow.jsx +++ b/frontend/src/components/EntryRow.jsx @@ -1,6 +1,28 @@ +import { useState } from 'react'; import { formatTimestamp, formatBytes, valueText, sourceIconSvg } from '../utils'; -export default function EntryRow({ entry, isSelected, onSelect }) { +export default function EntryRow({ entry, archiveId, isSelected, onSelect }) { + const [favFailed, setFavFailed] = useState(false); + const showFavicon = + entry.source_kind === 'web' && + entry.entity_kind === 'page' && + entry.has_favicon && + archiveId && + !favFailed; + + const icon = showFavicon ? ( + setFavFailed(true)} + style={{ objectFit: 'contain' }} + /> + ) : ( + + ); + return (
{formatTimestamp(entry.archived_at)}
- + {icon} {valueText(entry.title) || valueText(entry.entry_uid)}