feat: fe mobile responsive next (#1609)

This commit is contained in:
Yuhao
2023-11-27 11:47:48 +08:00
committed by GitHub
parent 3cc697832a
commit a9c1c7d239
89 changed files with 768 additions and 485 deletions

View File

@@ -11,7 +11,6 @@ import { useBoolean, useGetState } from 'ahooks'
import AppUnavailable from '../../base/app-unavailable'
import { checkOrSetAccessToken } from '../utils'
import useConversation from './hooks/use-conversation'
import s from './style.module.css'
import { ToastContext } from '@/app/components/base/toast'
import Sidebar from '@/app/components/share/chat/sidebar'
import ConfigSence from '@/app/components/share/chat/config-scence'
@@ -683,7 +682,7 @@ const Main: FC<IMainProps> = ({
}
return (
<div className='bg-gray-100'>
<div className='bg-gray-100 h-full'>
{!isInstalledApp && (
<Header
title={siteInfo.title}
@@ -720,7 +719,7 @@ const Main: FC<IMainProps> = ({
)}
{/* main */}
<div className={cn(
isInstalledApp ? s.installedApp : 'h-[calc(100vh_-_3rem)] tablet:h-screen',
isInstalledApp ? 'h-full' : 'h-[calc(100vh_-_3rem)] tablet:h-screen',
'flex-grow flex flex-col overflow-y-auto',
)
}>

View File

@@ -1,3 +0,0 @@
.installedApp {
height: calc(100vh - 74px);
}

View File

@@ -10,7 +10,6 @@ import { useBoolean, useGetState } from 'ahooks'
import { checkOrSetAccessToken } from '../utils'
import AppUnavailable from '../../base/app-unavailable'
import useConversation from './hooks/use-conversation'
import s from './style.module.css'
import { ToastContext } from '@/app/components/base/toast'
import ConfigScene from '@/app/components/share/chatbot/config-scence'
import Header from '@/app/components/share/header'
@@ -561,7 +560,7 @@ const Main: FC<IMainProps> = ({
<div className={'flex bg-white overflow-hidden'}>
<div className={cn(
isInstalledApp ? s.installedApp : 'h-[calc(100vh_-_3rem)]',
isInstalledApp ? 'h-full' : 'h-[calc(100vh_-_3rem)]',
'flex-grow flex flex-col overflow-y-auto',
)
}>

View File

@@ -1,3 +0,0 @@
.installedApp {
height: calc(100vh - 74px);
}

View File

@@ -33,7 +33,7 @@ const Header: FC<IHeaderProps> = ({
return (
<div
className={`
shrink-0 flex items-center justify-between h-12 px-3 bg-gray-100
shrink-0 flex items-center justify-between h-14 px-4 bg-gray-100
bg-gradient-to-r from-blue-600 to-sky-500
`}
>
@@ -52,7 +52,7 @@ const Header: FC<IHeaderProps> = ({
}
return (
<div className="shrink-0 flex items-center justify-between h-12 px-3 bg-gray-100">
<div className="shrink-0 flex items-center justify-between h-14 px-4 bg-gray-100">
<div
className='flex items-center justify-center h-8 w-8 cursor-pointer'
onClick={() => onShowSideBar?.()}

View File

@@ -1,5 +1,5 @@
.installedApp {
height: calc(100vh - 74px);
height: 100%;
border-radius: 16px;
box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
}