From 7a1bcac8bf87e2e1db019b6cfc4533c74bb8b61a Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Wed, 15 Mar 2023 01:56:39 +0800 Subject: [PATCH] fix: layout styles --- app/components/home.module.scss | 9 ++++++++- app/store.ts | 15 ++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/components/home.module.scss b/app/components/home.module.scss index 5a640acb..4bb6fb59 100644 --- a/app/components/home.module.scss +++ b/app/components/home.module.scss @@ -9,6 +9,8 @@ background-color: var(--white); min-width: 600px; min-height: 480px; + max-width: 900px; + max-height: 720px; display: flex; overflow: hidden; @@ -29,6 +31,9 @@ @include container(); + max-width: 100vw; + max-height: 100vh; + border-radius: 0; } @@ -53,8 +58,10 @@ @media only screen and (max-width: 600px) { .container { - min-width: unset; min-height: unset; + min-width: unset; + max-height: unset; + min-width: unset; border: 0; border-radius: 0; } diff --git a/app/store.ts b/app/store.ts index d0e38b00..2124b23d 100644 --- a/app/store.ts +++ b/app/store.ts @@ -258,13 +258,14 @@ export const useChatStore = create()( if (session.topic === DEFAULT_TOPIC) { // should summarize topic - requestWithPrompt(session.messages, "返回这句话的简要主题").then( - (res) => { - get().updateCurrentSession( - (session) => (session.topic = trimTopic(res)) - ); - } - ); + requestWithPrompt( + session.messages, + "直接返回这句话的简要主题,不要解释" + ).then((res) => { + get().updateCurrentSession( + (session) => (session.topic = trimTopic(res)) + ); + }); } },