Skip to content
Snippets Groups Projects
Unverified Commit fce14ee1 authored by balibabu's avatar balibabu Committed by GitHub
Browse files

feat: add loading to ChatContainer and set font family to inter and add...

feat: add loading to ChatContainer and set font family to inter and add tooltip to Form.Item and download documents on the document list page (#136)

* feat: download documents on the document list page

* feat: add tooltip to Form.Item

* feat: set font family to inter

* feat: add loading to ChatContainer
parent 69995981
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,7 @@ const ApiKeyModal = ({ ...@@ -66,6 +66,7 @@ const ApiKeyModal = ({
<Form.Item<FieldType> <Form.Item<FieldType>
label="Api-Key" label="Api-Key"
name="api_key" name="api_key"
tooltip="coming soon"
rules={[{ required: true, message: 'Please input api key!' }]} rules={[{ required: true, message: 'Please input api key!' }]}
> >
<Input /> <Input />
......
...@@ -43,16 +43,24 @@ const SystemModelSettingModal = ({ ...@@ -43,16 +43,24 @@ const SystemModelSettingModal = ({
confirmLoading={loading} confirmLoading={loading}
> >
<Form form={form} onValuesChange={onFormLayoutChange} layout={'vertical'}> <Form form={form} onValuesChange={onFormLayoutChange} layout={'vertical'}>
<Form.Item label="Sequence2txt model" name="asr_id"> <Form.Item
label="Sequence2txt model"
name="asr_id"
tooltip="coming soon"
>
<Select options={allOptions[LlmModelType.Speech2text]} /> <Select options={allOptions[LlmModelType.Speech2text]} />
</Form.Item> </Form.Item>
<Form.Item label="Embedding model" name="embd_id"> <Form.Item label="Embedding model" name="embd_id" tooltip="coming soon">
<Select options={allOptions[LlmModelType.Embedding]} /> <Select options={allOptions[LlmModelType.Embedding]} />
</Form.Item> </Form.Item>
<Form.Item label="Img2txt model" name="img2txt_id"> <Form.Item
label="Img2txt model"
name="img2txt_id"
tooltip="coming soon"
>
<Select options={allOptions[LlmModelType.Image2text]} /> <Select options={allOptions[LlmModelType.Image2text]} />
</Form.Item> </Form.Item>
<Form.Item label="Chat model" name="llm_id"> <Form.Item label="Chat model" name="llm_id" tooltip="coming soon">
<Select options={allOptions[LlmModelType.Chat]} /> <Select options={allOptions[LlmModelType.Chat]} />
</Form.Item> </Form.Item>
</Form> </Form>
......
...@@ -110,7 +110,7 @@ const UserSettingProfile = () => { ...@@ -110,7 +110,7 @@ const UserSettingProfile = () => {
<div> <div>
<Space> <Space>
Your photo Your photo
<Tooltip title="prompt text"> <Tooltip title="coming soon">
<QuestionCircleOutlined /> <QuestionCircleOutlined />
</Tooltip> </Tooltip>
</Space> </Space>
...@@ -140,6 +140,7 @@ const UserSettingProfile = () => { ...@@ -140,6 +140,7 @@ const UserSettingProfile = () => {
<Form.Item<FieldType> <Form.Item<FieldType>
label="Color schema" label="Color schema"
name="color_schema" name="color_schema"
tooltip="coming soon"
rules={[ rules={[
{ required: true, message: 'Please select your color schema!' }, { required: true, message: 'Please select your color schema!' },
]} ]}
...@@ -153,6 +154,7 @@ const UserSettingProfile = () => { ...@@ -153,6 +154,7 @@ const UserSettingProfile = () => {
<Form.Item<FieldType> <Form.Item<FieldType>
label="Language" label="Language"
name="language" name="language"
tooltip="coming soon"
rules={[{ required: true, message: 'Please input your language!' }]} rules={[{ required: true, message: 'Please input your language!' }]}
> >
<Select placeholder="select your language"> <Select placeholder="select your language">
...@@ -164,6 +166,7 @@ const UserSettingProfile = () => { ...@@ -164,6 +166,7 @@ const UserSettingProfile = () => {
<Form.Item<FieldType> <Form.Item<FieldType>
label="Timezone" label="Timezone"
name="timezone" name="timezone"
tooltip="coming soon"
rules={[{ required: true, message: 'Please input your timezone!' }]} rules={[{ required: true, message: 'Please input your timezone!' }]}
> >
<Select placeholder="select your timezone" showSearch> <Select placeholder="select your timezone" showSearch>
......
...@@ -61,3 +61,27 @@ export const getBase64FromUploadFileList = async (fileList?: UploadFile[]) => { ...@@ -61,3 +61,27 @@ export const getBase64FromUploadFileList = async (fileList?: UploadFile[]) => {
return ''; return '';
}; };
export const downloadFile = ({
url,
filename,
target,
}: {
url: string;
filename?: string;
target?: string;
}) => {
const downloadElement = document.createElement('a');
downloadElement.style.display = 'none';
downloadElement.href = url;
if (target) {
downloadElement.target = '_blank';
}
downloadElement.rel = 'noopener noreferrer';
if (filename) {
downloadElement.download = filename;
}
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement);
};
import 'umi/typings'; import 'umi/typings';
declare module 'lodash'; declare module 'lodash';
export type Nullable<T> = T | null; // declare type Nullable<T> = T | null; invalid
declare global {
type Nullable<T> = T | null;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment