change color textarea to white and hide history chat after chat
This commit is contained in:
parent
4b85b6ee39
commit
8e8a1d3e6b
3 changed files with 10 additions and 3 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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 })
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue