mirror of
https://github.com/songquanpeng/one-api.git
synced 2026-02-16 19:04:25 +08:00
feat: support feishu login now
This commit is contained in:
@@ -3,7 +3,8 @@ import { Button, Divider, Form, Grid, Header, Image, Message, Modal, Segment } f
|
||||
import { Link, useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import { UserContext } from '../context/User';
|
||||
import { API, getLogo, showError, showSuccess, showWarning } from '../helpers';
|
||||
import { onGitHubOAuthClicked } from './utils';
|
||||
import { onGitHubOAuthClicked, onLarkOAuthClicked } from './utils';
|
||||
import larkIcon from '../images/lark.svg';
|
||||
|
||||
const LoginForm = () => {
|
||||
const [inputs, setInputs] = useState({
|
||||
@@ -124,7 +125,7 @@ const LoginForm = () => {
|
||||
点击注册
|
||||
</Link>
|
||||
</Message>
|
||||
{status.github_oauth || status.wechat_login ? (
|
||||
{status.github_oauth || status.wechat_login || status.lark_client_id ? (
|
||||
<>
|
||||
<Divider horizontal>Or</Divider>
|
||||
{status.github_oauth ? (
|
||||
@@ -137,6 +138,18 @@ const LoginForm = () => {
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
{status.lark_client_id ? (
|
||||
<Button
|
||||
// circular
|
||||
color=''
|
||||
onClick={() => onLarkOAuthClicked(status.lark_client_id)}
|
||||
style={{ padding: 0, width: 36, height: 36 }}
|
||||
>
|
||||
<img src={larkIcon} width={36} height={36} />
|
||||
</Button>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
{status.wechat_login ? (
|
||||
<Button
|
||||
circular
|
||||
|
||||
Reference in New Issue
Block a user