From a2d2ca43480f338fdf4f3bfce66330c68918e6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E4=BC=9F=E5=BC=BA?= Date: Fri, 19 May 2023 14:37:41 +0800 Subject: [PATCH] chore: installed app --- web/app/components/share/chat/index.tsx | 9 ++++++++- web/app/components/share/chat/sidebar/index.tsx | 12 ++++++++++-- web/app/components/share/chat/style.module.css | 3 +++ web/app/components/share/text-generation/index.tsx | 12 +++++++++--- .../share/text-generation/style.module.css | 4 ++++ 5 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 web/app/components/share/chat/style.module.css diff --git a/web/app/components/share/chat/index.tsx b/web/app/components/share/chat/index.tsx index 9e73003781..2ad54d48d6 100644 --- a/web/app/components/share/chat/index.tsx +++ b/web/app/components/share/chat/index.tsx @@ -25,6 +25,8 @@ import { userInputsFormToPromptVariables } from '@/utils/model-config' import { SuggestedQuestionsAfterAnswerConfig } from '@/models/debug' import { InstalledApp } from '@/models/explore' +import s from './style.module.css' + export type IMainProps = { isInstalledApp?: boolean, installedAppInfo? : InstalledApp @@ -441,6 +443,7 @@ const Main: FC = ({ onCurrentIdChange={handleConversationIdChange} currentId={currConversationId} copyRight={siteInfo.copyright || siteInfo.title} + isInstalledApp={isInstalledApp} /> ) } @@ -476,7 +479,11 @@ const Main: FC = ({ )} {/* main */} -
+
void list: ConversationItem[] + isInstalledApp: boolean } const Sidebar: FC = ({ copyRight, currentId, onCurrentIdChange, - list }) => { + list, + isInstalledApp +}) => { const { t } = useTranslation() return (
{list.length < MAX_CONVERSATION_LENTH && (
diff --git a/web/app/components/share/chat/style.module.css b/web/app/components/share/chat/style.module.css new file mode 100644 index 0000000000..402ced89d7 --- /dev/null +++ b/web/app/components/share/chat/style.module.css @@ -0,0 +1,3 @@ +.installedApp { + height: calc(100vh - 120px); +} \ No newline at end of file diff --git a/web/app/components/share/text-generation/index.tsx b/web/app/components/share/text-generation/index.tsx index 09f5d6f379..6c00c37203 100644 --- a/web/app/components/share/text-generation/index.tsx +++ b/web/app/components/share/text-generation/index.tsx @@ -210,9 +210,11 @@ const TextGeneration: FC = ({
<>
@@ -267,7 +269,11 @@ const TextGeneration: FC = ({ return ( <> -
+
{/* Left */}
diff --git a/web/app/components/share/text-generation/style.module.css b/web/app/components/share/text-generation/style.module.css index 60376aa1af..1fc6b6711b 100644 --- a/web/app/components/share/text-generation/style.module.css +++ b/web/app/components/share/text-generation/style.module.css @@ -1,3 +1,7 @@ +.installedApp { + height: calc(100vh - 72px); +} + .appIcon { width: 32px; height: 32px;