chore: replace components with core-ui, upgrade eslint

This commit is contained in:
jialin
2026-04-24 14:28:30 +08:00
committed by jialin
parent d48aa99dcc
commit 8711c27b78
470 changed files with 1017 additions and 24093 deletions
@@ -1,8 +1,8 @@
import { PageAction } from '@/config';
import { PageActionType } from '@/config/types';
import useAppUtils from '@/hooks/use-app-utils';
import SelectPanel from '@/pages/_components/select-panel';
import { queryMyModels } from '@/pages/llmodels/apis';
import { SelectPanel } from '@gpustack/core-ui';
import { useIntl } from '@umijs/max';
import { Checkbox, Divider, Form, Radio } from 'antd';
import { useEffect, useState } from 'react';
@@ -1,8 +1,10 @@
import Password from '@/components/seal-form/password';
import SealInput from '@/components/seal-form/seal-input';
import SealSelect from '@/components/seal-form/seal-select';
import { PageAction } from '@/config';
import { PageActionType } from '@/config/types';
import {
Input as CInput,
Password,
Select as SealSelect
} from '@gpustack/core-ui';
import { useIntl } from '@umijs/max';
import { Form } from 'antd';
import React from 'react';
@@ -34,12 +36,12 @@ const APIKeyForm: React.FC<{
}
]}
>
<SealInput.Input
<CInput.Input
trim
disabled={action === PageAction.EDIT}
label={intl.formatMessage({ id: 'common.table.name' })}
required
></SealInput.Input>
></CInput.Input>
</Form.Item>
<Form.Item<FormData>
@@ -66,10 +68,10 @@ const APIKeyForm: React.FC<{
></SealSelect>
</Form.Item>
<Form.Item<FormData> name="description" rules={[{ required: false }]}>
<SealInput.TextArea
<CInput.TextArea
scaleSize={true}
label={intl.formatMessage({ id: 'common.table.description' })}
></SealInput.TextArea>
></CInput.TextArea>
</Form.Item>
{action === PageAction.CREATE && (
<>
@@ -1,11 +1,13 @@
import AlertBlockInfo from '@/components/alert-info/block';
import CopyButton from '@/components/copy-button';
import ModalFooter from '@/components/modal-footer';
import GSDrawer from '@/components/scroller-modal/gs-drawer';
import SealInput from '@/components/seal-form/seal-input';
import { PageAction } from '@/config';
import { PageActionType } from '@/config/types';
import ColumnWrapper from '@/pages/_components/column-wrapper';
import {
AlertBlockInfo,
Input as CInput,
ColumnWrapper,
CopyButton,
GSDrawer,
ModalFooter
} from '@gpustack/core-ui';
import { useIntl } from '@umijs/max';
import { Form, Tag } from 'antd';
import dayjs from 'dayjs';
@@ -296,7 +298,7 @@ const AddModal: React.FC<AddModalProps> = ({
{intl.formatMessage({ id: 'apikeys.table.save.tips' })}
</Tag>
</div>
<SealInput.Input
<CInput.Input
label={intl.formatMessage({ id: 'apikeys.form.apikey' })}
value={apikeyValue}
addAfter={
@@ -307,7 +309,7 @@ const AddModal: React.FC<AddModalProps> = ({
type="text"
></CopyButton>
}
></SealInput.Input>
></CInput.Input>
</Form.Item>
)}
</Form>
@@ -1,15 +1,13 @@
// columns.ts
import AutoTooltip from '@/components/auto-tooltip';
import DropdownButtons from '@/components/drop-down-buttons';
import icons from '@/components/icon-font/icons';
import { tableSorter } from '@/config/settings';
import { AutoTooltip, DropdownButtons } from '@gpustack/core-ui';
import icons from '@gpustack/core-ui/lib/components/icon-font/icons';
import { useIntl } from '@umijs/max';
import { Tag } from 'antd';
import { ColumnsType } from 'antd/lib/table';
import dayjs from 'dayjs';
import { useMemo } from 'react';
import { ListItem } from '../config/types';
interface ColumnsHookProps {
handleSelect: (val: string, record: ListItem) => void;
sortOrder: string[];
+2 -4
View File
@@ -1,12 +1,10 @@
import DeleteModal from '@/components/delete-modal';
import IconFont from '@/components/icon-font';
import { FilterBar } from '@/components/page-tools';
import { PageAction } from '@/config';
import { PaginationKey } from '@/config/settings';
import type { PageActionType } from '@/config/types';
import useTableFetch from '@/hooks/use-table-fetch';
import useQueryUserList from '@/pages/users/services/use-query-user-list';
import { useModel } from '@@/plugin-model';
import { DeleteModal, FilterBar, IconFont } from '@gpustack/core-ui';
import { useIntl } from '@umijs/max';
import useMemoizedFn from 'ahooks/lib/useMemoizedFn';
import { ConfigProvider, Table } from 'antd';
@@ -191,7 +189,7 @@ const APIKeys: React.FC = () => {
rowKey="id"
onChange={handleTableChange}
pagination={{
size: 'default',
size: 'middle',
showSizeChanger: true,
pageSize: queryParams.perPage,
current: queryParams.page,