mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 00:56:26 +00:00
perf: 文案提示;删除账号
This commit is contained in:
@@ -4,9 +4,9 @@ export enum EmailTypeEnum {
|
||||
}
|
||||
|
||||
export const introPage = `
|
||||
## 欢迎使用 Doc GPT
|
||||
## 欢迎使用 Fast GPT
|
||||
|
||||
[Git 仓库](https://github.com/c121914yu/DocGPT)
|
||||
[Git 仓库](https://github.com/c121914yu/FastGPT)
|
||||
|
||||
时间比较赶,介绍没来得及完善,先直接上怎么使用:
|
||||
1. 使用邮箱注册账号。
|
||||
|
@@ -243,9 +243,9 @@ const Chat = ({ chatId, windowId }: { chatId: string; windowId?: string }) => {
|
||||
if (typeof fnMap[chatSiteData.chatModel] === 'function') {
|
||||
await fnMap[chatSiteData.chatModel](requestPrompt);
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
toast({
|
||||
title: typeof err === 'string' ? err : '聊天出错了~',
|
||||
title: typeof err === 'string' ? err : err?.message || '聊天出错了~',
|
||||
status: 'warning',
|
||||
duration: 5000,
|
||||
isClosable: true
|
||||
|
@@ -12,8 +12,10 @@ import {
|
||||
Td,
|
||||
TableContainer,
|
||||
Select,
|
||||
Input
|
||||
Input,
|
||||
IconButton
|
||||
} from '@chakra-ui/react';
|
||||
import { DeleteIcon } from '@chakra-ui/icons';
|
||||
import { useForm, useFieldArray } from 'react-hook-form';
|
||||
import { UserUpdateParams } from '@/types/user';
|
||||
import { putUserInfo } from '@/api/user';
|
||||
@@ -130,7 +132,15 @@ const NumberSetting = () => {
|
||||
></Input>
|
||||
</Td>
|
||||
<Td>
|
||||
<Button onClick={() => removeAccount(i)}>删除</Button>
|
||||
<IconButton
|
||||
aria-label="删除账号"
|
||||
icon={<DeleteIcon />}
|
||||
colorScheme={'red'}
|
||||
onClick={() => {
|
||||
removeAccount(i);
|
||||
handleSubmit(onclickSave)();
|
||||
}}
|
||||
/>
|
||||
</Td>
|
||||
</Tr>
|
||||
))}
|
||||
|
@@ -35,7 +35,7 @@ export const authChat = async (chatId: string) => {
|
||||
const userApiKey = user.accounts?.find((item: any) => item.type === 'openai')?.value;
|
||||
|
||||
if (!userApiKey) {
|
||||
return Promise.reject('该用户缺少ApiKey, 无法请求');
|
||||
return Promise.reject('缺少ApiKey, 无法请求');
|
||||
}
|
||||
|
||||
return {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
const tokenKey = 'doc-gpt-token';
|
||||
const tokenKey = 'fast-gpt-token';
|
||||
|
||||
export const setToken = (val: string) => {
|
||||
localStorage.setItem(tokenKey, val);
|
||||
|
Reference in New Issue
Block a user