mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
chore: settings
This commit is contained in:
27
src/components/SwitchOrigin/index.tsx
vendored
27
src/components/SwitchOrigin/index.tsx
vendored
@@ -1,9 +1,10 @@
|
||||
import { FC } from 'react';
|
||||
import { Form, Select, Tag } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Form, Select, Tag, Tooltip } from 'antd';
|
||||
import { QuestionCircleOutlined } from '@ant-design/icons';
|
||||
|
||||
import useJson from '@/hooks/useJson';
|
||||
import { DISABLE_AUTO_COMPLETE, CHAT_CONF_JSON, CHAT_AWESOME_JSON } from '@/utils';
|
||||
|
||||
import { DISABLE_AUTO_COMPLETE, CHAT_AWESOME_JSON } from '@/utils';
|
||||
interface SwitchOriginProps {
|
||||
name: string;
|
||||
}
|
||||
@@ -13,13 +14,27 @@ const SwitchOrigin: FC<SwitchOriginProps> = ({ name }) => {
|
||||
|
||||
return (
|
||||
<Form.Item
|
||||
label={<span>Switch Origin ({name === 'origin' ? 'Main' : 'SystemTray'})</span>}
|
||||
label={
|
||||
<span>
|
||||
Switch Origin ({name === 'origin' ? 'Main' : 'SystemTray'}){' '}
|
||||
<Tooltip
|
||||
title={
|
||||
<div>
|
||||
If you need to set a new URL as the application loading window, please add the URL
|
||||
in the <Link to="/">Awesome</Link> menu and then select it.
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<QuestionCircleOutlined style={{ color: '#1677ff' }} />
|
||||
</Tooltip>
|
||||
</span>
|
||||
}
|
||||
name={name}
|
||||
>
|
||||
<Select showSearch {...DISABLE_AUTO_COMPLETE} optionLabelProp="url">
|
||||
{[{ title: 'ChatGPT', url: 'https://chat.openai.com' }, ...list].map((i) => (
|
||||
<Select.Option key={i.url} label={i.title} value={i.url}>
|
||||
<Tag color="geekblue">{i.title}</Tag> {i.url}
|
||||
<Select.Option key={i.url} label={i.title} value={i.url} title={i.url}>
|
||||
<Tag color={i.title === 'ChatGPT' ? 'orange' : 'geekblue'}>{i.title}</Tag> {i.url}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
|
||||
Reference in New Issue
Block a user