fix(style): imgs overflow style on chat
This commit is contained in:
@@ -50,7 +50,7 @@ const useStyles = createStyles(({ css, token }) => {
|
|||||||
return {
|
return {
|
||||||
wrapper: css`
|
wrapper: css`
|
||||||
position: relative;
|
position: relative;
|
||||||
min-width: 300px;
|
min-width: 360px;
|
||||||
height: 54px;
|
height: 54px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const Overview: React.FC = () => {
|
|||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Row gutter={[24, 20]} className={styles.row}>
|
<Row gutter={[20, 20]} className={styles.row}>
|
||||||
{overviewConfigs.map((config, index) => (
|
{overviewConfigs.map((config, index) => (
|
||||||
<Col
|
<Col
|
||||||
xs={{ flex: '100%' }}
|
xs={{ flex: '100%' }}
|
||||||
|
|||||||
@@ -187,11 +187,13 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getDefaultSpec = (item: any) => {
|
const getDefaultSpec = (item: any) => {
|
||||||
const defaultSpec = item.evaluateResult?.default_spec || {};
|
const defaultSpec = _.get(item.evaluateResult?.default_spec, [
|
||||||
return _.omit(defaultSpec, [
|
'backend_version',
|
||||||
'cpu_offloading',
|
'backend_parameters',
|
||||||
'distributed_inference_across_workers'
|
'env'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
return defaultSpec;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getCategory = (item: any) => {
|
const getCategory = (item: any) => {
|
||||||
|
|||||||
@@ -36,11 +36,22 @@ const audioTypeMap: Record<string, string> = {
|
|||||||
|
|
||||||
const AudioWrapper = styled.div`
|
const AudioWrapper = styled.div`
|
||||||
padding-block: 10px;
|
padding-block: 10px;
|
||||||
|
height: max-content;
|
||||||
|
width: max-content;
|
||||||
audio {
|
audio {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const ImgsWrapper = styled.div.attrs({
|
||||||
|
className: 'custom-scrollbar-horizontal'
|
||||||
|
})`
|
||||||
|
display: flex;
|
||||||
|
overflow-x: auto;
|
||||||
|
width: 100%;
|
||||||
|
flex-direction: column;
|
||||||
|
`;
|
||||||
|
|
||||||
type CurrentMessage = Omit<MessageItem, 'uid'>;
|
type CurrentMessage = Omit<MessageItem, 'uid'>;
|
||||||
|
|
||||||
type ActionType =
|
type ActionType =
|
||||||
@@ -505,8 +516,9 @@ const MessageInput: React.FC<MessageInputProps> = forwardRef(
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<ImgsWrapper>
|
||||||
<ThumbImg
|
<ThumbImg
|
||||||
|
style={{ paddingBlockEnd: 0 }}
|
||||||
dataList={message.imgs || []}
|
dataList={message.imgs || []}
|
||||||
onDelete={handleDeleteImg}
|
onDelete={handleDeleteImg}
|
||||||
editable={true}
|
editable={true}
|
||||||
@@ -521,7 +533,7 @@ const MessageInput: React.FC<MessageInputProps> = forwardRef(
|
|||||||
></SimpleAudio>
|
></SimpleAudio>
|
||||||
</AudioWrapper>
|
</AudioWrapper>
|
||||||
)}
|
)}
|
||||||
</div>
|
</ImgsWrapper>
|
||||||
<div className="input-box">
|
<div className="input-box">
|
||||||
{actions.includes('paste') ? (
|
{actions.includes('paste') ? (
|
||||||
<TextArea
|
<TextArea
|
||||||
|
|||||||
@@ -18,7 +18,17 @@ import ThinkContent from './think-content';
|
|||||||
const AudioWrapper = styled.div`
|
const AudioWrapper = styled.div`
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
height: max-content;
|
height: max-content;
|
||||||
margin-right: 10px;
|
width: max-content;
|
||||||
|
margin-inline: 10px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const ThumbImgWrapper = styled.div.attrs({
|
||||||
|
className: 'custom-scrollbar-horizontal'
|
||||||
|
})`
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
overflow-x: auto;
|
||||||
|
flex-direction: column;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
interface MessageBodyProps {
|
interface MessageBodyProps {
|
||||||
@@ -239,8 +249,9 @@ const MessageBody: React.FC<MessageBodyProps> = forwardRef(
|
|||||||
})}
|
})}
|
||||||
onClick={handleClickWrapper}
|
onClick={handleClickWrapper}
|
||||||
>
|
>
|
||||||
<div className="justify-start ">
|
<ThumbImgWrapper>
|
||||||
<ThumbImg
|
<ThumbImg
|
||||||
|
style={{ paddingBlockEnd: 0 }}
|
||||||
editable={editable}
|
editable={editable}
|
||||||
dataList={data.imgs || []}
|
dataList={data.imgs || []}
|
||||||
onDelete={handleDeleteImg}
|
onDelete={handleDeleteImg}
|
||||||
@@ -255,7 +266,7 @@ const MessageBody: React.FC<MessageBodyProps> = forwardRef(
|
|||||||
></SimpleAudio>
|
></SimpleAudio>
|
||||||
</AudioWrapper>
|
</AudioWrapper>
|
||||||
)}
|
)}
|
||||||
</div>
|
</ThumbImgWrapper>
|
||||||
<>
|
<>
|
||||||
{data.role === Roles.User ? (
|
{data.role === Roles.User ? (
|
||||||
<Input.TextArea
|
<Input.TextArea
|
||||||
|
|||||||
Reference in New Issue
Block a user