chore: replace components with core-ui, upgrade eslint
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import IconFont from '@/components/icon-font';
|
||||
import SealInput from '@/components/seal-form/seal-input';
|
||||
import SealSelect from '@/components/seal-form/seal-select';
|
||||
import SealSwitch from '@/components/seal-form/seal-switch';
|
||||
import { PageAction, PasswordReg } from '@/config';
|
||||
import { PageActionType } from '@/config/types';
|
||||
import {
|
||||
Input as CInput,
|
||||
IconFont,
|
||||
Select as SealSelect,
|
||||
Switch as SealSwitch
|
||||
} from '@gpustack/core-ui';
|
||||
import { useIntl, useModel } from '@umijs/max';
|
||||
import { Form, Select } from 'antd';
|
||||
import { useEffect } from 'react';
|
||||
@@ -76,17 +78,17 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
}
|
||||
]}
|
||||
>
|
||||
<SealInput.Input
|
||||
<CInput.Input
|
||||
autoComplete="off"
|
||||
label={intl.formatMessage({ id: 'common.table.name' })}
|
||||
required
|
||||
></SealInput.Input>
|
||||
></CInput.Input>
|
||||
</Form.Item>
|
||||
<Form.Item<FormData> name="full_name" rules={[{ required: false }]}>
|
||||
<SealInput.Input
|
||||
<CInput.Input
|
||||
trim={false}
|
||||
label={intl.formatMessage({ id: 'users.form.fullname' })}
|
||||
></SealInput.Input>
|
||||
></CInput.Input>
|
||||
</Form.Item>
|
||||
<div style={{ display: 'flex', gap: '16px' }}>
|
||||
<div style={{ flex: 1 }}>
|
||||
@@ -150,11 +152,11 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
}
|
||||
]}
|
||||
>
|
||||
<SealInput.Password
|
||||
<CInput.Password
|
||||
autoComplete={'new-password'}
|
||||
label={intl.formatMessage({ id: 'common.form.password' })}
|
||||
required={action === PageAction.CREATE}
|
||||
></SealInput.Password>
|
||||
></CInput.Password>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</FormDrawer>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
// columns.ts
|
||||
import AutoTooltip from '@/components/auto-tooltip';
|
||||
import DropdownButtons from '@/components/drop-down-buttons';
|
||||
import IconFont from '@/components/icon-font';
|
||||
import icons from '@/components/icon-font/icons';
|
||||
import { tableSorter } from '@/config/settings';
|
||||
import { AutoTooltip, DropdownButtons, IconFont } from '@gpustack/core-ui';
|
||||
import icons from '@gpustack/core-ui/lib/components/icon-font/icons';
|
||||
import { useIntl, useModel } from '@umijs/max';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
import { Tag } from 'antd';
|
||||
@@ -11,7 +9,6 @@ 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[];
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import DeleteModal from '@/components/delete-modal';
|
||||
import IconFont from '@/components/icon-font';
|
||||
import { FilterBar } from '@/components/page-tools';
|
||||
import { PageAction } from '@/config';
|
||||
import { PaginationKey, TABLE_SORT_DIRECTIONS } from '@/config/settings';
|
||||
import type { PageActionType } from '@/config/types';
|
||||
import useTableFetch from '@/hooks/use-table-fetch';
|
||||
import { DeleteModal, FilterBar, IconFont } from '@gpustack/core-ui';
|
||||
import { useIntl, useModel } from '@umijs/max';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
import { ConfigProvider, message, Table } from 'antd';
|
||||
|
||||
Reference in New Issue
Block a user