mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-18 19:46:44 +08:00
### What problem does this PR solve? Fix: Added styles for empty states on the page. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { EmptyType } from '@/components/empty/constant';
|
||||
import Empty from '@/components/empty/empty';
|
||||
import { FileIcon } from '@/components/icon-font';
|
||||
import { ImageWithPopover } from '@/components/image';
|
||||
import { Input } from '@/components/originui/input';
|
||||
@ -65,6 +67,7 @@ export default function SearchingView({
|
||||
// changeLanguage();
|
||||
// }, [i18n]);
|
||||
const [searchtext, setSearchtext] = useState<string>('');
|
||||
const [retrievalLoading, setRetrievalLoading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setSearchtext(searchStr);
|
||||
@ -182,6 +185,9 @@ export default function SearchingView({
|
||||
selectedDocumentIds={selectedDocumentIds}
|
||||
setSelectedDocumentIds={setSelectedDocumentIds}
|
||||
onTesting={handleTestChunk}
|
||||
setLoading={(loading: boolean) => {
|
||||
setRetrievalLoading(loading);
|
||||
}}
|
||||
></RetrievalDocuments>
|
||||
</div>
|
||||
{/* <div className="w-full border-b border-border-default/80 my-6"></div> */}
|
||||
@ -264,6 +270,17 @@ export default function SearchingView({
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
{!isSearchStrEmpty &&
|
||||
!retrievalLoading &&
|
||||
!answer.answer &&
|
||||
!sendingLoading &&
|
||||
total <= 0 &&
|
||||
chunks?.length <= 0 &&
|
||||
relatedQuestions?.length <= 0 && (
|
||||
<div className="h-2/5 flex items-center justify-center">
|
||||
<Empty type={EmptyType.SearchData} iconWidth={80} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{total > 0 && (
|
||||
|
||||
Reference in New Issue
Block a user