fix: phone

This commit is contained in:
archer
2023-07-17 20:52:11 +08:00
parent 44e360b61b
commit 509ca92f0a
12 changed files with 30 additions and 31 deletions

View File

@@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683254592786" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1352" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M450.09164971 42.7357605a123.86965959 123.86965959 0 0 1 123.76374272 0L889.06369251 222.84722403a123.92261859 123.92261859 0 0 1 62.06722618 107.2407279v360.38180181c0 44.22025102-23.6194395 85.05116445-61.9613093 107.13480989l-0.10591688 0.10591687-315.20830008 180.11146353a123.86965959 123.86965959 0 0 1-123.76374272 0L134.93630749 797.7104805a123.92261859 123.92261859 0 0 1-62.06722618-107.24072676V330.08795193c0-44.22025102 23.67239737-85.05116445 61.9613093-107.13481102l0.10591688-0.10591688z m462.16781482 223.59029646a33.78744889 33.78744889 0 0 0-46.17971029-12.28634453l-353.81496263 204.57823687L158.44982898 254.09267029a33.78744889 33.78744889 0 0 0-33.89336463 58.46605597l353.6031289 204.47232v430.02207687c0 18.00585102 15.14609778 32.62236445 33.84040675 32.62236444a33.20490667 33.20490667 0 0 0 33.73449102-32.62236444V517.29583787l354.18567111-204.79006948a33.78744889 33.78744889 0 0 0 14.66947129-41.20162304z" p-id="1353"></path></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1684739031957" class="icon" viewBox="0 0 1026 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4988" xmlns:xlink="http://www.w3.org/1999/xlink" width="64.125" height="64"><path d="M371.732817 94.172314q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 247.821878q0 25.773475-18.338819 44.112294t-44.112294 18.338819l-247.821878 0q-25.773475 0-43.616651-18.338819t-17.843175-44.112294l0-247.821878q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM371.732817 589.81607q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 248.813166q0 25.773475-18.338819 43.616651t-44.112294 17.843175l-247.821878 0q-25.773475 0-43.616651-17.843175t-17.843175-43.616651l0-248.813166q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM868.367861 589.81607q25.773475 0 43.616651 17.843175t17.843175 43.616651l0 248.813166q0 25.773475-17.843175 43.616651t-43.616651 17.843175l-247.821878 0q-25.773475 0-44.112294-17.843175t-18.338819-43.616651l0-248.813166q0-25.773475 18.338819-43.616651t44.112294-17.843175l247.821878 0zM1006.156825 203.21394q19.82575 19.82575 19.82575 46.590513t-19.82575 45.599226l-184.379477 184.379477q-19.82575 19.82575-46.094869 19.82575t-46.094869-19.82575l-184.379477-184.379477q-18.834463-18.834463-18.834463-45.599226t18.834463-46.590513l184.379477-184.379477q19.82575-18.834463 46.094869-18.834463t46.094869 18.834463z" p-id="4989"></path></svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683254592786" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1352" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M450.09164971 42.7357605a123.86965959 123.86965959 0 0 1 123.76374272 0L889.06369251 222.84722403a123.92261859 123.92261859 0 0 1 62.06722618 107.2407279v360.38180181c0 44.22025102-23.6194395 85.05116445-61.9613093 107.13480989l-0.10591688 0.10591687-315.20830008 180.11146353a123.86965959 123.86965959 0 0 1-123.76374272 0L134.93630749 797.7104805a123.92261859 123.92261859 0 0 1-62.06722618-107.24072676V330.08795193c0-44.22025102 23.67239737-85.05116445 61.9613093-107.13481102l0.10591688-0.10591688z m462.16781482 223.59029646a33.78744889 33.78744889 0 0 0-46.17971029-12.28634453l-353.81496263 204.57823687L158.44982898 254.09267029a33.78744889 33.78744889 0 0 0-33.89336463 58.46605597l353.6031289 204.47232v430.02207687c0 18.00585102 15.14609778 32.62236445 33.84040675 32.62236444a33.20490667 33.20490667 0 0 0 33.73449102-32.62236444V517.29583787l354.18567111-204.79006948a33.78744889 33.78744889 0 0 0 14.66947129-41.20162304z" p-id="1353"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1689598169213" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3429" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M254.80971969 32C131.70542094 32 32 131.82654219 32 254.83663531c0 123.11775656 99.81308438 222.83214938 222.80971969 222.83214938h222.92186906V254.83663531C477.72710281 131.71439281 377.91401844 32 254.80971969 32z m514.38056062 0c-122.99214938 0-222.92186906 99.82654219-222.92186906 222.83663531v222.83214938h222.92186906C892.18691562 477.66878469 992 377.95887875 992 254.83663531 992 131.71439281 892.18691562 32 769.19028031 32zM32 769.16336469C32 892.28560719 131.81308438 992 254.80971969 992c123.10429875 0 222.80971969-99.71439281 222.80971968-222.83663531v-222.83214938H254.80971969C131.81308438 546.33121531 32 646.04112125 32 769.16336469z m737.07813094-222.83214938h-222.91738313v222.83214938c0 123.12224344 99.81308438 222.83663531 222.91738313 222.83663531 123.10878469 0 222.80971969-99.82654219 222.80971968-222.83663531 0.11214937-123.11775656-99.700935-222.83214938-222.80971968-222.83214938z" p-id="3430"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1688888266618" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6979" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M1008.302197 306.556735 789.691542 525.16739C769.561962 545.29697 736.950904 545.29697 716.821324 525.16739L498.2391 306.556735C478.10952 286.455586 478.10952 253.816097 498.2391 233.714948L716.821324 15.104293C736.950904-5.025287 769.561962-5.025287 789.691542 15.104293L1008.302197 233.714948C1028.431777 253.816097 1028.431777 286.455586 1008.302197 306.556735ZM753.668691 54.823253 537.958061 270.533884 753.668691 486.244515 969.379322 270.533884 753.668691 54.823253ZM369.841946 1023.971568 57.094228 1023.971568C25.677298 1023.971568 0.231007 998.525277 0.231007 967.108347L0.231007 654.360629C0.231007 622.972131 25.677298 597.497407 57.094228 597.497407L369.841946 597.497407C401.230445 597.497407 426.705168 622.972131 426.705168 654.360629L426.705168 967.108347C426.705168 998.525277 401.230445 1023.971568 369.841946 1023.971568ZM369.841946 654.360629 57.094228 654.360629 57.094228 967.108347 369.841946 967.108347 369.841946 654.360629ZM369.841946 512.202575 57.094228 512.202575C25.677298 512.202575 0.231007 486.756284 0.231007 455.339354L0.231007 142.591636C0.231007 111.203137 25.677298 85.728414 57.094228 85.728414L369.841946 85.728414C401.230445 85.728414 426.705168 111.203137 426.705168 142.591636L426.705168 455.339354C426.705168 486.756284 401.230445 512.202575 369.841946 512.202575ZM369.841946 142.591636 57.094228 142.591636 57.094228 455.339354 369.841946 455.339354 369.841946 142.591636ZM568.863221 597.497407 881.61094 597.497407C912.999438 597.497407 938.474161 622.972131 938.474161 654.360629L938.474161 967.108347C938.474161 998.525277 912.999438 1023.971568 881.61094 1023.971568L568.863221 1023.971568C537.446292 1023.971568 512 998.525277 512 967.108347L512 654.360629C512 622.972131 537.446292 597.497407 568.863221 597.497407ZM568.863221 967.108347 881.61094 967.108347 881.61094 654.360629 568.863221 654.360629 568.863221 967.108347Z" p-id="6980"></path></svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1683450443331" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1727" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M58.15222827 227.09272427L492.1075808-23.4520384a39.00952427 39.00952427 0 0 1 39.00952427 0l433.95657066 250.54476267a39.00952427 39.00952427 0 0 1 19.50476267 33.78346666v501.0895232a39.00952427 39.00952427 0 0 1-19.50476267 33.78224747l-433.95657066 250.54476267a39.00952427 39.00952427 0 0 1-39.00952427 0L58.15100907 795.7479616a39.00952427 39.00952427 0 0 1-19.5047616-33.78224747V260.87619093a39.00952427 39.00952427 0 0 1 19.5047616-33.78346666z m63.494096 53.5503232a9.7523808 9.7523808 0 0 0-4.87619094 8.4467808v444.66224746a9.7523808 9.7523808 0 0 0 4.87619094 8.44556267l385.08982826 222.3311232a9.7523808 9.7523808 0 0 0 9.7523808 0l385.08860907-222.329904a9.7523808 9.7523808 0 0 0 4.87619093-8.44678187V289.08982827a9.7523808 9.7523808 0 0 0-4.87619093-8.4467808L516.48853333 58.3131424a9.7523808 9.7523808 0 0 0-9.7523808 0l-385.08982826 222.32990507z m389.56129493 190.72l300.3611424-173.4131808c18.65752427-10.77150507 42.51550507-4.3788192 53.28822933 14.27870506 10.77150507 18.65752427 4.3788192 42.51550507-14.27870506 53.28822827L551.00952427 538.4728384V881.37142827c0 21.54422827-17.46529493 39.00952427-39.00952427 39.00952426-21.54422827 0-39.00952427-17.46529493-39.00952427-39.00952426V539.38712427L172.89386667 366.12632427c-18.65752427-10.77272427-25.05142827-34.63070507-14.27870507-53.28822934 10.77272427-18.65752427 34.63070507-25.05142827 53.28822933-14.278704L511.2076192 471.36304747z" p-id="1728"></path></svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1689598155704" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3279" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M770.011 483.622h-228.59v-215.25c0-57.579 23.778-111.675 66.912-152.327C651.296 75.432 708.593 53.04 769.711 53.04c60.988 0 118.329 22.392 161.463 63.045C974.265 156.738 998 210.834 998 268.372c0 57.618-23.735 111.714-66.826 152.286-43.091 40.613-100.303 62.964-161.163 62.964z m-164.21-215.25v154.513h164.167c43.735 0 84.766-16.034 115.626-45.147l0.043-0.04c30.945-29.114 47.984-67.944 47.984-109.326 0-41.342-17.04-80.132-48.027-109.326-61.89-58.429-170.09-58.388-231.68-0.04C622.84 188.24 605.8 227.03 605.8 268.371z m163.91 270.925c60.86 0 118.157 22.351 161.377 62.923C974.265 642.954 998 697.05 998 754.628c0 57.66-23.777 111.755-66.869 152.327C888.04 947.608 830.7 970 769.711 970c-61.118 0-118.415-22.432-161.507-63.166-43.048-40.531-66.783-94.627-66.783-152.206v-215.33h228.29z m115.883 324.698c30.988-29.114 48.027-67.944 48.027-109.367 0-41.341-17.04-80.212-48.027-109.406-30.988-29.154-72.191-45.188-115.883-45.188H605.8v154.594c0 41.342 17.039 80.132 47.984 109.286 61.847 58.469 169.919 58.469 231.809 0.08zM254.289 53c60.903 0 118.244 22.392 161.42 63.045 43.135 40.774 66.87 94.87 66.87 152.327v215.33h-228.29c-60.988 0-118.329-22.39-161.42-63.044C49.777 379.965 26 325.91 26 268.372c0-57.579 23.777-111.634 66.869-152.287C135.96 75.432 193.258 53 254.289 53zM418.2 422.966V268.372c0-41.22-17.039-80.092-47.984-109.367-30.988-29.153-72.19-45.268-115.926-45.268-43.82 0-84.98 16.074-115.926 45.268C107.418 188.2 90.38 227.03 90.38 268.372c0 41.3 17.04 80.131 47.984 109.325 30.946 29.194 72.148 45.27 115.926 45.27H418.2zM92.912 602.18c43.22-40.572 100.56-62.883 161.377-62.883h228.204v215.331c0 57.457-23.735 111.513-66.826 152.287-43.005 40.653-100.346 63.045-161.378 63.045-60.988 0-118.329-22.392-161.42-63.045C49.735 866.262 26 812.166 26 754.628c0-57.578 23.735-111.674 66.869-152.327l0.043-0.121z m325.201 152.448V600.034H254.29c-43.692 0-84.852 16.034-115.968 45.188-30.903 29.234-47.942 68.065-47.942 109.406 0 41.342 17.04 80.132 47.984 109.407 61.89 58.348 170.048 58.267 231.723 0 30.988-29.315 48.027-68.146 48.027-109.407z" p-id="3280"></path></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -3,7 +3,8 @@ import type { IconProps } from '@chakra-ui/react';
import { Icon } from '@chakra-ui/react';
const map = {
app: require('./icons/app.svg').default,
appFill: require('./icons/fill/app.svg').default,
appLight: require('./icons/light/app.svg').default,
copy: require('./icons/copy.svg').default,
chatSend: require('./icons/chatSend.svg').default,
delete: require('./icons/delete.svg').default,
@@ -43,8 +44,8 @@ const map = {
shareLight: require('./icons/light/share.svg').default,
dbLight: require('./icons/light/db.svg').default,
dbFill: require('./icons/fill/db.svg').default,
appLight: require('./icons/light/app.svg').default,
appFill: require('./icons/fill/app.svg').default,
appStoreLight: require('./icons/light/appStore.svg').default,
appStoreFill: require('./icons/fill/appStore.svg').default,
meLight: require('./icons/light/me.svg').default,
meFill: require('./icons/fill/me.svg').default,
welcomeText: require('./icons/modules/welcomeText.svg').default,

View File

@@ -29,8 +29,8 @@ const Navbar = ({ unread }: { unread: number }) => {
},
{
label: '应用',
icon: 'tabbarModel',
activeIcon: 'app',
icon: 'appLight',
activeIcon: 'appFill',
link: `/app/list`,
activeLink: ['/app/list', '/app/detail']
},
@@ -43,8 +43,8 @@ const Navbar = ({ unread }: { unread: number }) => {
},
{
label: '市场',
icon: 'appLight',
activeIcon: 'appFill',
icon: 'appStoreLight',
activeIcon: 'appStoreFill',
link: '/appStore',
activeLink: ['/appStore']
},

View File

@@ -12,7 +12,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
() => [
{
label: '聊天',
icon: 'tabbarChat',
icon: 'chatLight',
link: `/chat?appId=${lastChatAppId}&historyId=${lastHistoryId}`,
activeLink: ['/chat'],
unread: 0

View File

@@ -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导出',

View File

@@ -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();

View File

@@ -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'}

View File

@@ -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',