remove date, block global search for audio, video and documents

This commit is contained in:
smanylov
2026-02-26 19:32:57 +07:00
parent d2161fe221
commit 3b3e18f22d
4 changed files with 18 additions and 14 deletions
+4 -1
View File
@@ -45,6 +45,7 @@ export default function SectionSearchFile({ allowedExtensions, maxFileSize }: Se
const [isFileUploaded, setIsFileUploaded] = useState<boolean>(false);
const [uploadProgress, setUploadProgress] = useState<number>(0);
const [fileId, setFileId] = useState<string | null>(null);
const [fileType, setFileType] = useState<string | null>(null);
const queryClient = useQueryClient();
const isCancelledRef = useRef(false);
@@ -93,6 +94,7 @@ export default function SectionSearchFile({ allowedExtensions, maxFileSize }: Se
if (fileId) {
await removeUserFile(fileId, 1);
setFileId(null);
setFileType(null);
}
setError(null);
@@ -214,6 +216,7 @@ export default function SectionSearchFile({ allowedExtensions, maxFileSize }: Se
if (isLastChunk && chunkResponse.fileId) {
setFileId(chunkResponse.fileId);
setFileType(fileType);
document.cookie = `searchedFileId=${chunkResponse.fileId}`
}
}
@@ -348,7 +351,7 @@ export default function SectionSearchFile({ allowedExtensions, maxFileSize }: Se
</div>
{isFileUploaded && (
<FileSearchPanel fileId={fileId} ref={childRef} allowedExtensions={allowedExtensions} />
<FileSearchPanel fileId={fileId} ref={childRef} allowedExtensions={allowedExtensions} fileType={fileType} />
)}
</div>
);