Fix: Added styles for empty states on the page. #10703 (#11588)

### 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:
chanx
2025-11-28 14:03:20 +08:00
committed by GitHub
parent dbdda0fbab
commit 7d05d4ced7
29 changed files with 866 additions and 419 deletions

View File

@ -58,7 +58,7 @@ export const useSelectLlmOptions = () => {
function buildLlmOptionsWithIcon(x: IThirdOAIModel) {
return {
label: (
<div className="flex items-center justify-center gap-6">
<div className="flex items-center justify-center gap-2">
<LlmIcon
name={getLLMIconName(x.fid, x.llm_name)}
width={24}

View File

@ -14,9 +14,16 @@ export const useNavigatePage = () => {
const [searchParams] = useSearchParams();
const { id } = useParams();
const navigateToDatasetList = useCallback(() => {
navigate(Routes.Datasets);
}, [navigate]);
const navigateToDatasetList = useCallback(
({ isCreate = false }: { isCreate?: boolean }) => {
if (isCreate) {
navigate(Routes.Datasets + '?isCreate=true');
} else {
navigate(Routes.Datasets);
}
},
[navigate],
);
const navigateToDataset = useCallback(
(id: string) => () => {

View File

@ -54,7 +54,7 @@ export const useFetchTenantInfo = (
): ResponseGetType<ITenantInfo> => {
const { t } = useTranslation();
const { data, isFetching: loading } = useQuery({
queryKey: ['tenantInfo'],
queryKey: ['tenantInfo', showEmptyModelWarn],
initialData: {},
gcTime: 0,
queryFn: async () => {
@ -99,7 +99,6 @@ export const useSelectParserList = (): Array<{
label: string;
}> => {
const { data: tenantInfo } = useFetchTenantInfo(true);
const parserList = useMemo(() => {
const parserArray: Array<string> = tenantInfo?.parser_ids?.split(',') ?? [];
return parserArray.map((x) => {