mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-28 16:17:02 +00:00
feat: add wiki title search (#7264)
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wiki2-search-result-bottom mark {
|
||||
.wiki2-search-result mark {
|
||||
padding: 0;
|
||||
background: yellow;
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ import { gettext } from '../../utils/constants';
|
||||
import './wiki2-search-result.css';
|
||||
|
||||
function Wiki2SearchResult({ result, getCurrentPageId, setCurrentPage, resetToDefault, setRef, isHighlight }) {
|
||||
const { content, page } = result;
|
||||
const { content, page, title } = result;
|
||||
const currentPageId = getCurrentPageId();
|
||||
const isCurrentPage = currentPageId === page.id;
|
||||
return (
|
||||
@@ -19,7 +19,9 @@ function Wiki2SearchResult({ result, getCurrentPageId, setCurrentPage, resetToDe
|
||||
>
|
||||
<div className='wiki2-search-result-top d-flex align-items-center'>
|
||||
{page.icon ? <CustomIcon icon={page.icon} /> : <NavItemIcon symbol={'file'} disable={true} />}
|
||||
<span className='wiki2-search-result-page-name text-truncate' title={page.name} style={isCurrentPage ? { width: 'auto' } : { width: 700 }}>{page.name}</span>
|
||||
<span className='wiki2-search-result-page-name text-truncate' title={page.name} style={isCurrentPage ? { width: 'auto' } : { width: 700 }}>
|
||||
{title ? <span dangerouslySetInnerHTML={{ __html: title }}></span> : page.name}
|
||||
</span>
|
||||
{isCurrentPage ?
|
||||
<span className='wiki2-search-result-current'>{gettext('Current page')}</span> :
|
||||
<span className='wiki2-search-result-enter sf3-font sf3-font-enter' style={isHighlight ? { opacity: 1 } : {}}></span>
|
||||
|
Reference in New Issue
Block a user