From 4a5465f8840639987bfae52babfe0596bd4b8254 Mon Sep 17 00:00:00 2001 From: butterfly Date: Mon, 22 Apr 2024 11:02:25 +0800 Subject: [PATCH] feat: chat panel header absolute --- app/components/{MenuWrapper => MenuLayout}/index.tsx | 2 +- app/containers/Chat/ChatHeader.tsx | 2 +- app/containers/Chat/ChatMessagePanel.tsx | 2 +- app/containers/Chat/ChatPanel.tsx | 2 +- app/containers/Chat/index.tsx | 6 +++--- app/containers/Settings/SettingPanel.tsx | 2 +- app/containers/Settings/index.tsx | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) rename app/components/{MenuWrapper => MenuLayout}/index.tsx (98%) diff --git a/app/components/MenuWrapper/index.tsx b/app/components/MenuLayout/index.tsx similarity index 98% rename from app/components/MenuWrapper/index.tsx rename to app/components/MenuLayout/index.tsx index 79ab3d088..fff0b38f9 100644 --- a/app/components/MenuWrapper/index.tsx +++ b/app/components/MenuLayout/index.tsx @@ -17,7 +17,7 @@ export interface MenuWrapperInspectProps { showPanel?: boolean; } -export default function MenuWrapper< +export default function MenuLayout< ListComponentProps extends MenuWrapperInspectProps, PanelComponentProps extends MenuWrapperInspectProps, >( diff --git a/app/containers/Chat/ChatHeader.tsx b/app/containers/Chat/ChatHeader.tsx index f99152559..412d91226 100644 --- a/app/containers/Chat/ChatHeader.tsx +++ b/app/containers/Chat/ChatHeader.tsx @@ -44,7 +44,7 @@ export default function ChatHeader(props: ChatHeaderProps) { return (
{isMobileScreen ? ( diff --git a/app/containers/Chat/ChatMessagePanel.tsx b/app/containers/Chat/ChatMessagePanel.tsx index f8b9d217e..b4eda94a8 100644 --- a/app/containers/Chat/ChatMessagePanel.tsx +++ b/app/containers/Chat/ChatMessagePanel.tsx @@ -141,7 +141,7 @@ export default function ChatMessagePanel(props: ChatMessagePanelProps) { return (
onChatBodyScroll(e.currentTarget)} onMouseDown={() => inputRef.current?.blur()} diff --git a/app/containers/Chat/ChatPanel.tsx b/app/containers/Chat/ChatPanel.tsx index 50933e63e..b1defa72a 100644 --- a/app/containers/Chat/ChatPanel.tsx +++ b/app/containers/Chat/ChatPanel.tsx @@ -263,7 +263,7 @@ function _Chat() { return (
void }) { const promptStore = usePromptStore(); diff --git a/app/containers/Settings/index.tsx b/app/containers/Settings/index.tsx index e80789a47..9914a6e76 100644 --- a/app/containers/Settings/index.tsx +++ b/app/containers/Settings/index.tsx @@ -1,12 +1,12 @@ import Locale from "@/app/locales"; import useMobileScreen from "@/app/hooks/useMobileScreen"; -import MenuWrapper from "@/app/components/MenuWrapper"; +import MenuLayout from "@/app/components/MenuLayout"; import Panel from "./SettingPanel"; import GotoIcon from "@/app/icons/goto.svg"; -export default MenuWrapper(function SettingList(props) { +export default MenuLayout(function SettingList(props) { const { setShowPanel } = props; const isMobileScreen = useMobileScreen();