فهرست منبع

fix: loading and calc rem (#1006)

crazywoola 1 سال پیش
والد
کامیت
70e24b7594
2فایلهای تغییر یافته به همراه11 افزوده شده و 5 حذف شده
  1. 6 3
      web/app/components/share/chat/index.tsx
  2. 5 2
      web/app/components/share/chatbot/index.tsx

+ 6 - 3
web/app/components/share/chat/index.tsx

@@ -570,8 +570,11 @@ const Main: FC<IMainProps> = ({
   if (appUnavailable)
   if (appUnavailable)
     return <AppUnavailable isUnknwonReason={isUnknwonReason} />
     return <AppUnavailable isUnknwonReason={isUnknwonReason} />
 
 
-  if (!appId || !siteInfo || !promptConfig)
-    return <Loading type='app' />
+  if (!appId || !siteInfo || !promptConfig) {
+    return <div className='flex h-screen w-full'>
+      <Loading type='app' />
+    </div>
+  }
 
 
   return (
   return (
     <div className='bg-gray-100'>
     <div className='bg-gray-100'>
@@ -611,7 +614,7 @@ const Main: FC<IMainProps> = ({
         )}
         )}
         {/* main */}
         {/* main */}
         <div className={cn(
         <div className={cn(
-          isInstalledApp ? s.installedApp : 'h-screen',
+          isInstalledApp ? s.installedApp : 'h-[calc(100vh_-_3rem)] tablet:h-screen',
           'flex-grow flex flex-col overflow-y-auto',
           'flex-grow flex flex-col overflow-y-auto',
         )
         )
         }>
         }>

+ 5 - 2
web/app/components/share/chatbot/index.tsx

@@ -494,8 +494,11 @@ const Main: FC<IMainProps> = ({
   if (appUnavailable)
   if (appUnavailable)
     return <AppUnavailable isUnknwonReason={isUnknwonReason} />
     return <AppUnavailable isUnknwonReason={isUnknwonReason} />
 
 
-  if (!appId || !siteInfo || !promptConfig)
-    return <Loading type='app' />
+  if (!appId || !siteInfo || !promptConfig) {
+    return <div className='flex h-screen w-full'>
+      <Loading type='app' />
+    </div>
+  }
 
 
   return (
   return (
     <div>
     <div>