mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-16 14:45:53 +08:00
feat: add background image to login page and alter tooltip of base_url and add llm type to Added models List (#173)
* feat: add llm type to Added models List * feat: alter tooltip of base_url * feat: add background image to login page
This commit is contained in:
parent
ffed0876f2
commit
204385a7bf
90
web/src/assets/svg/login-avatars.svg
Normal file
90
web/src/assets/svg/login-avatars.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 1.7 MiB |
10
web/src/assets/svg/login-background.svg
Normal file
10
web/src/assets/svg/login-background.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 3.3 MiB |
11
web/src/assets/svg/login-star.svg
Normal file
11
web/src/assets/svg/login-star.svg
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M0 40C25.4247 40 40 25.4247 40 0C40 25.4247 54.5753 40 80 40C54.5753 40 40 54.5753 40 80C40 54.5753 25.4247 40 0 40Z"
|
||||||
|
fill="white" />
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M0 12C7.62742 12 12 7.62742 12 0C12 7.62742 16.3726 12 24 12C16.3726 12 12 16.3726 12 24C12 16.3726 7.62742 12 0 12Z"
|
||||||
|
fill="#FEC84B" />
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M64 24C69.0849 24 72 21.0849 72 16C72 21.0849 74.9151 24 80 24C74.9151 24 72 26.9151 72 32C72 26.9151 69.0849 24 64 24Z"
|
||||||
|
fill="#FEC84B" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 718 B |
@ -2,4 +2,5 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
@ -1,32 +1,77 @@
|
|||||||
@import '../../theme/vars';
|
@import '../../theme/vars';
|
||||||
|
|
||||||
.loginPage {
|
.loginPage {
|
||||||
// width: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.loginLeft {
|
.loginLeft {
|
||||||
// width: 610px;
|
// width: 610px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 957px) {
|
.leftContainer {
|
||||||
.loginLeft {
|
width: 60%;
|
||||||
// width: 610px;
|
padding: 5px, 0px, 5px, 0px;
|
||||||
width: 100%;
|
margin: 0 auto;
|
||||||
background-color: #fff;
|
|
||||||
height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal {
|
|
||||||
width: 80%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.loginRight {
|
.loginRight {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background-color: #f2f4f7;
|
position: relative;
|
||||||
|
&::before {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: rgba(24, 73, 169, 0.6);
|
||||||
|
background-image: url('@/assets/svg/login-background.svg');
|
||||||
|
background-size: cover;
|
||||||
|
background-blend-mode: multiply;
|
||||||
|
filter: blur(3px);
|
||||||
|
background-position: center;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
.white {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.pink {
|
||||||
|
color: #e9d7fe;
|
||||||
|
}
|
||||||
|
.rightPanel {
|
||||||
|
max-width: 640px;
|
||||||
|
.loginTitle {
|
||||||
|
font-size: 72px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 90px;
|
||||||
|
letter-spacing: -1.44px;
|
||||||
|
}
|
||||||
|
.loginDescription {
|
||||||
|
font-size: 20px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
.loginRateNumber {
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
.loginRateReviews {
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loginTitle {
|
.loginTitle {
|
||||||
@ -46,12 +91,16 @@
|
|||||||
color: #000000a6;
|
color: #000000a6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.modal {
|
@media screen and (max-width: 957px) {
|
||||||
// width: 360px;
|
.loginLeft {
|
||||||
width: 60%;
|
width: 100%;
|
||||||
height: 724px;
|
background-color: #fff;
|
||||||
padding: 5px, 0px, 5px, 0px;
|
height: 100%;
|
||||||
margin: 80px auto;
|
}
|
||||||
|
|
||||||
|
.modal {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@ import { rsaPsw } from '@/utils';
|
|||||||
import { Button, Checkbox, Form, Input } from 'antd';
|
import { Button, Checkbox, Form, Input } from 'antd';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Icon, useDispatch, useNavigate, useSelector } from 'umi';
|
import { Icon, useDispatch, useNavigate, useSelector } from 'umi';
|
||||||
|
import RightPanel from './right-panel';
|
||||||
|
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
const Login = () => {
|
const Login = () => {
|
||||||
@ -73,7 +75,7 @@ const Login = () => {
|
|||||||
return (
|
return (
|
||||||
<div className={styles.loginPage}>
|
<div className={styles.loginPage}>
|
||||||
<div className={styles.loginLeft}>
|
<div className={styles.loginLeft}>
|
||||||
<div className={styles.modal}>
|
<div className={styles.leftContainer}>
|
||||||
<div className={styles.loginTitle}>
|
<div className={styles.loginTitle}>
|
||||||
<div>{title === 'login' ? 'Sign in' : 'Create an account'}</div>
|
<div>{title === 'login' ? 'Sign in' : 'Create an account'}</div>
|
||||||
<span>
|
<span>
|
||||||
@ -189,7 +191,9 @@ const Login = () => {
|
|||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.loginRight}></div>
|
<div className={styles.loginRight}>
|
||||||
|
<RightPanel></RightPanel>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
46
web/src/pages/login/right-panel.tsx
Normal file
46
web/src/pages/login/right-panel.tsx
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import { ReactComponent as Avatars } from '@/assets/svg/login-avatars.svg';
|
||||||
|
import SvgIcon from '@/components/svg-icon';
|
||||||
|
import { Flex, Rate, Space, Typography } from 'antd';
|
||||||
|
import classNames from 'classnames';
|
||||||
|
|
||||||
|
import styles from './index.less';
|
||||||
|
|
||||||
|
const { Title, Text } = Typography;
|
||||||
|
|
||||||
|
const LoginRightPanel = () => {
|
||||||
|
return (
|
||||||
|
<section className={styles.rightPanel}>
|
||||||
|
<SvgIcon name="login-star" width={80}></SvgIcon>
|
||||||
|
<Flex vertical gap={40}>
|
||||||
|
<Title
|
||||||
|
level={1}
|
||||||
|
className={classNames(styles.white, styles.loginTitle)}
|
||||||
|
>
|
||||||
|
Start building your smart assisstants.
|
||||||
|
</Title>
|
||||||
|
<Text className={classNames(styles.pink, styles.loginDescription)}>
|
||||||
|
Sign up for free to explore top RAG technology. Create knowledge bases
|
||||||
|
and AIs to empower your business.
|
||||||
|
</Text>
|
||||||
|
<Flex align="center" gap={16}>
|
||||||
|
<Avatars></Avatars>
|
||||||
|
<Flex vertical>
|
||||||
|
<Space>
|
||||||
|
<Rate disabled defaultValue={5} />
|
||||||
|
<span
|
||||||
|
className={classNames(styles.white, styles.loginRateNumber)}
|
||||||
|
>
|
||||||
|
5.0
|
||||||
|
</span>
|
||||||
|
</Space>
|
||||||
|
<span className={classNames(styles.pink, styles.loginRateReviews)}>
|
||||||
|
from 500+ reviews
|
||||||
|
</span>
|
||||||
|
</Flex>
|
||||||
|
</Flex>
|
||||||
|
</Flex>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default LoginRightPanel;
|
@ -78,10 +78,9 @@ const ApiKeyModal = ({
|
|||||||
<Form.Item<FieldType>
|
<Form.Item<FieldType>
|
||||||
label="Base-Url"
|
label="Base-Url"
|
||||||
name="base_url"
|
name="base_url"
|
||||||
tooltip="The API key can be obtained by registering the corresponding LLM supplier."
|
tooltip="If your API key is from OpenAI, just ignore it. Any other intermediate providers will give this base url with the API key."
|
||||||
rules={[{ required: true, message: 'Please input base url!' }]}
|
|
||||||
>
|
>
|
||||||
<Input />
|
<Input placeholder="https://api.openai.com/v1" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -24,6 +24,7 @@ import {
|
|||||||
Row,
|
Row,
|
||||||
Space,
|
Space,
|
||||||
Spin,
|
Spin,
|
||||||
|
Tag,
|
||||||
Typography,
|
Typography,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
@ -105,7 +106,13 @@ const ModelCard = ({ item, clickApiKey }: IModelCardProps) => {
|
|||||||
size="small"
|
size="small"
|
||||||
dataSource={item.llm}
|
dataSource={item.llm}
|
||||||
className={styles.llmList}
|
className={styles.llmList}
|
||||||
renderItem={(item) => <List.Item>{item.name}</List.Item>}
|
renderItem={(item) => (
|
||||||
|
<List.Item>
|
||||||
|
<Space>
|
||||||
|
{item.name} <Tag color="#b8b8b8">{item.type}</Tag>
|
||||||
|
</Space>
|
||||||
|
</List.Item>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user