change color textarea to white and hide history chat after chat

This commit is contained in:
unknown 2025-08-21 10:11:45 +07:00
parent 4b85b6ee39
commit 8e8a1d3e6b
3 changed files with 10 additions and 3 deletions

View file

@ -31,7 +31,7 @@
gap: 40px; gap: 40px;
textarea { textarea {
font-size: 14px; font-size: 14px;
color: #606060; color: white;
width: 100%; width: 100%;
border: none; border: none;
outline: none; outline: none;

View file

@ -24,6 +24,7 @@ import AppUnavailable from '@/components/app-unavailable';
import { API_KEY, APP_ID, APP_INFO, isShowPrompt, promptTemplate } from '@/config'; import { API_KEY, APP_ID, APP_INFO, isShowPrompt, promptTemplate } from '@/config';
import type { Annotation as AnnotationType } from '@/types/log'; import type { Annotation as AnnotationType } from '@/types/log';
import { addFileInfos, sortAgentSorts } from '@/utils/tools'; import { addFileInfos, sortAgentSorts } from '@/utils/tools';
import { useAuthStore } from '@/stores/useAuthStore';
export type IMainProps = { export type IMainProps = {
params: any; params: any;
@ -34,6 +35,7 @@ import HistoryChat from '@/components/layouts/history-chat/history-chat';
import Chat from '@/components/layouts/chat/chat'; import Chat from '@/components/layouts/chat/chat';
const Main: FC = () => { const Main: FC = () => {
const { hideHistoryChat, setHideHistoryCHat } = useAuthStore();
const { t } = useTranslation(); const { t } = useTranslation();
const media = useBreakpoints(); const media = useBreakpoints();
const isMobile = media === MediaType.mobile; const isMobile = media === MediaType.mobile;
@ -654,6 +656,7 @@ const Main: FC = () => {
} }
}); });
getHistoryChat(currConversationId); getHistoryChat(currConversationId);
setHideHistoryCHat(true);
}; };
const handleFeedback = async (messageId: string, feedback: Feedbacktype) => { const handleFeedback = async (messageId: string, feedback: Feedbacktype) => {
@ -694,7 +697,7 @@ const Main: FC = () => {
checkCanSend={checkCanSend} checkCanSend={checkCanSend}
visionConfig={visionConfig} visionConfig={visionConfig}
/> />
<HistoryChat data={historyChatList} /> {!hideHistoryChat && <HistoryChat data={historyChatList} />}
</main> </main>
</> </>
); );

View file

@ -2,10 +2,14 @@ import { create } from 'zustand';
interface State { interface State {
isLogin: boolean; isLogin: boolean;
hideHistoryChat: boolean;
setLogin: (val: boolean) => void; setLogin: (val: boolean) => void;
setHideHistoryCHat: (val: boolean) => void;
} }
export const useAuthStore = create<State>((set) => ({ export const useAuthStore = create<State>((set) => ({
isLogin: false, isLogin: false,
setLogin: (val) => set({ isLogin: val }) hideHistoryChat: false,
setLogin: (val) => set({ isLogin: val }),
setHideHistoryCHat: (val) => set({ hideHistoryChat: val })
})); }));