From c24a790c9eacae01aec44f1adbc72f949f0b88f0 Mon Sep 17 00:00:00 2001 From: balibabu <cike8899@users.noreply.github.com> Date: Tue, 9 Apr 2024 14:21:42 +0800 Subject: [PATCH] feat: add ollama.md link to OllamaModal (#272) ### What problem does this PR solve? add ollama.md link to OllamaModal Issue link:#221 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/locales/en.ts | 1 + web/src/locales/zh.ts | 1 + web/src/pages/login/index.less | 4 ++-- .../setting-model/ollama-modal/index.tsx | 16 +++++++++++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index b6d1cec..b34790c 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -398,6 +398,7 @@ export default { addLlmBaseUrl: 'Base url', baseUrlNameMessage: 'Please input your base url!', vision: 'Does it support Vision?', + ollamaLink: 'How to integrate Ollama', }, message: { registered: 'Registered!', diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts index a8b18fb..8032930 100644 --- a/web/src/locales/zh.ts +++ b/web/src/locales/zh.ts @@ -383,6 +383,7 @@ export default { modelNameMessage: '请输入模型ĺŤç§°ďĽ', modelTypeMessage: '请输入模型类型ďĽ', baseUrlNameMessage: '请输入基础 UrlďĽ', + ollamaLink: '如何集ć Ollama', }, message: { registered: '注册ć功', diff --git a/web/src/pages/login/index.less b/web/src/pages/login/index.less index e1b5ef9..b640414 100644 --- a/web/src/pages/login/index.less +++ b/web/src/pages/login/index.less @@ -45,9 +45,9 @@ color: #e9d7fe; } .rightPanel { - max-width: 640px; + max-width: 670px; .loginTitle { - font-size: 72px; + font-size: 68px; font-style: normal; font-weight: 600; line-height: 90px; diff --git a/web/src/pages/user-setting/setting-model/ollama-modal/index.tsx b/web/src/pages/user-setting/setting-model/ollama-modal/index.tsx index 797de71..b4805b6 100644 --- a/web/src/pages/user-setting/setting-model/ollama-modal/index.tsx +++ b/web/src/pages/user-setting/setting-model/ollama-modal/index.tsx @@ -1,7 +1,7 @@ import { useTranslate } from '@/hooks/commonHooks'; import { IModalProps } from '@/interfaces/common'; import { IAddLlmRequestBody } from '@/interfaces/request/llm'; -import { Form, Input, Modal, Select, Switch } from 'antd'; +import { Flex, Form, Input, Modal, Select, Space, Switch } from 'antd'; import omit from 'lodash/omit'; type FieldType = IAddLlmRequestBody & { vision: boolean }; @@ -42,6 +42,20 @@ const OllamaModal = ({ onOk={handleOk} onCancel={hideModal} okButtonProps={{ loading }} + footer={(originNode: React.ReactNode) => { + return ( + <Flex justify={'space-between'}> + <a + href="https://github.com/infiniflow/ragflow/blob/main/docs/ollama.md" + target="_blank" + rel="noreferrer" + > + {t('ollamaLink')} + </a> + <Space>{originNode}</Space> + </Flex> + ); + }} > <Form name="basic" -- GitLab