fix: add lora tag in routes
This commit is contained in:
@@ -7,18 +7,28 @@ import {
|
|||||||
StatusTag
|
StatusTag
|
||||||
} from '@gpustack/core-ui';
|
} from '@gpustack/core-ui';
|
||||||
import { useIntl } from '@umijs/max';
|
import { useIntl } from '@umijs/max';
|
||||||
import { Col, Row } from 'antd';
|
import { Col, Row, Tag } from 'antd';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { TargetStatus, TargetStatusLabelMap } from '../config';
|
import { TargetStatus, TargetStatusLabelMap } from '../config';
|
||||||
import { RouteTarget } from '../config/types';
|
import { RouteTarget } from '../config/types';
|
||||||
|
|
||||||
const CellContent = styled.div`
|
const CellContent = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const FilesTag = styled(Tag)`
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-inline: 4px 0;
|
||||||
|
transform: scale(0.9);
|
||||||
|
border-radius: 12px;
|
||||||
|
`;
|
||||||
|
|
||||||
interface ProviderModelProps {
|
interface ProviderModelProps {
|
||||||
dataList: RouteTarget[];
|
dataList: RouteTarget[];
|
||||||
onSelect: (val: any, record: any) => void;
|
onSelect: (val: any, record: any) => void;
|
||||||
@@ -83,10 +93,16 @@ const RouteItem: React.FC<TargetItemProps> = ({
|
|||||||
<Col span={5}>
|
<Col span={5}>
|
||||||
<CellContent
|
<CellContent
|
||||||
style={{
|
style={{
|
||||||
|
gap: 4,
|
||||||
paddingInline: 'var(--ant-table-cell-padding-inline)'
|
paddingInline: 'var(--ant-table-cell-padding-inline)'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<AutoTooltip ghost>{data.name}</AutoTooltip>
|
<AutoTooltip ghost>{data.name}</AutoTooltip>
|
||||||
|
{!!data.lora_module_name && (
|
||||||
|
<FilesTag color="purple" variant="outlined">
|
||||||
|
<span style={{ opacity: 1 }}>LoRA</span>
|
||||||
|
</FilesTag>
|
||||||
|
)}
|
||||||
</CellContent>
|
</CellContent>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={5} style={{ paddingLeft: 64 }}>
|
<Col span={5} style={{ paddingLeft: 64 }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user