mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-11 08:19:01 +08:00
feat: add citation index to show (#7052)
This commit is contained in:
parent
3ee8186f96
commit
e65091f83c
@ -139,6 +139,7 @@ const WebSearchCitation: React.FC<{ citation: Citation }> = ({ citation }) => {
|
|||||||
<WebSearchCard>
|
<WebSearchCard>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<WebSearchCardHeader>
|
<WebSearchCardHeader>
|
||||||
|
<CitationIndex>{citation.number}</CitationIndex>
|
||||||
{citation.showFavicon && citation.url && (
|
{citation.showFavicon && citation.url && (
|
||||||
<Favicon hostname={new URL(citation.url).hostname} alt={citation.title || citation.hostname || ''} />
|
<Favicon hostname={new URL(citation.url).hostname} alt={citation.title || citation.hostname || ''} />
|
||||||
)}
|
)}
|
||||||
@ -162,6 +163,7 @@ const KnowledgeCitation: React.FC<{ citation: Citation }> = ({ citation }) => {
|
|||||||
<WebSearchCard>
|
<WebSearchCard>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<WebSearchCardHeader>
|
<WebSearchCardHeader>
|
||||||
|
<CitationIndex>{citation.number}</CitationIndex>
|
||||||
{citation.showFavicon && <FileSearch width={16} />}
|
{citation.showFavicon && <FileSearch width={16} />}
|
||||||
<CitationLink className="text-nowrap" href={citation.url} onClick={(e) => handleLinkClick(citation.url, e)}>
|
<CitationLink className="text-nowrap" href={citation.url} onClick={(e) => handleLinkClick(citation.url, e)}>
|
||||||
{citation.title}
|
{citation.title}
|
||||||
@ -210,6 +212,13 @@ const PreviewIcon = styled.div`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
const CitationIndex = styled.div`
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: var(--color-text-2);
|
||||||
|
margin-right: 8px;
|
||||||
|
`
|
||||||
|
|
||||||
const CitationLink = styled.a`
|
const CitationLink = styled.a`
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user