fix: phone
This commit is contained in:
@@ -7,11 +7,11 @@ import MyIcon from '@/components/Icon';
|
||||
const ToolMenu = ({ history }: { history: ChatItemType[] }) => {
|
||||
const { onExportChat } = useChatBox();
|
||||
const menuList = useRef([
|
||||
{
|
||||
icon: 'shareLight',
|
||||
label: '分享对话',
|
||||
onClick: () => {}
|
||||
},
|
||||
// {
|
||||
// icon: 'shareLight',
|
||||
// label: '分享对话',
|
||||
// onClick: () => {}
|
||||
// },
|
||||
{
|
||||
icon: 'apiLight',
|
||||
label: 'HTML导出',
|
||||
|
||||
@@ -10,12 +10,15 @@ import { useShareChatStore, defaultHistory } from '@/store/shareChat';
|
||||
import SideBar from '@/components/SideBar';
|
||||
import { gptMessage2ChatType } from '@/utils/adapt';
|
||||
import { getErrText } from '@/utils/tools';
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
import ChatBox, { type ComponentRef, type StartChatFnProps } from '@/components/ChatBox';
|
||||
import PageContainer from '@/components/PageContainer';
|
||||
import ChatHistorySlider from './components/ChatHistorySlider';
|
||||
import ChatHeader from './components/ChatHeader';
|
||||
|
||||
const ChatHistorySlider = dynamic(() => import('./components/ChatHistorySlider'), {
|
||||
ssr: false
|
||||
});
|
||||
|
||||
const ShareChat = ({ shareId, historyId }: { shareId: string; historyId: string }) => {
|
||||
const router = useRouter();
|
||||
const { toast } = useToast();
|
||||
|
||||
@@ -17,7 +17,7 @@ const Login = () => {
|
||||
const { lastRoute = '' } = router.query as { lastRoute: string };
|
||||
const { isPc } = useGlobalStore();
|
||||
const [pageType, setPageType] = useState<`${PageTypeEnum}`>(PageTypeEnum.login);
|
||||
const { setUserInfo, loadKbList, setLastKbId } = useUserStore();
|
||||
const { setUserInfo } = useUserStore();
|
||||
const { setLastHistoryId, setLastChatAppId } = useChatStore();
|
||||
|
||||
const loginSuccess = useCallback(
|
||||
@@ -25,15 +25,13 @@ const Login = () => {
|
||||
// init store
|
||||
setLastHistoryId('');
|
||||
setLastChatAppId('');
|
||||
setLastKbId('');
|
||||
loadKbList(true);
|
||||
|
||||
setUserInfo(res.user);
|
||||
setTimeout(() => {
|
||||
router.push(lastRoute ? decodeURIComponent(lastRoute) : '/model');
|
||||
router.push(lastRoute ? decodeURIComponent(lastRoute) : '/app/list');
|
||||
}, 100);
|
||||
},
|
||||
[lastRoute, loadKbList, router, setLastHistoryId, setLastChatAppId, setLastKbId, setUserInfo]
|
||||
[lastRoute, router, setLastHistoryId, setLastChatAppId, setUserInfo]
|
||||
);
|
||||
|
||||
function DynamicComponent({ type }: { type: `${PageTypeEnum}` }) {
|
||||
@@ -48,10 +46,6 @@ const Login = () => {
|
||||
return <Component setPageType={setPageType} loginSuccess={loginSuccess} />;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
router.prefetch('/model');
|
||||
}, [router]);
|
||||
|
||||
return (
|
||||
<Flex
|
||||
alignItems={'center'}
|
||||
|
||||
@@ -6,14 +6,14 @@ import { useRouter } from 'next/router';
|
||||
|
||||
const list = [
|
||||
{
|
||||
icon: 'kb',
|
||||
icon: 'dbLight',
|
||||
label: '我的知识库',
|
||||
link: '/kb'
|
||||
link: '/kb/list'
|
||||
},
|
||||
{
|
||||
icon: 'appStore',
|
||||
icon: 'appStoreLight',
|
||||
label: 'AI应用市场',
|
||||
link: '/model/share'
|
||||
link: '/appStore'
|
||||
},
|
||||
{
|
||||
icon: 'git',
|
||||
|
||||
Reference in New Issue
Block a user