feat(brand): 聊天页 sxwz 模式下输入框左移 172px
- ChatPage 接入 useBrand,brand === 'sxwz' 时主容器和输入框 translate-x-[-172px] - 退出对话回欢迎页时同步关闭 artifacts 面板
This commit is contained in:
parent
0bd9b9bdcb
commit
9eb494b1b4
@ -28,6 +28,7 @@ import { MessageList } from "@/components/workspace/messages";
|
||||
import { ThreadContext } from "@/components/workspace/messages/context";
|
||||
import { Tooltip } from "@/components/workspace/tooltip";
|
||||
import { useSpecificChatMode } from "@/components/workspace/use-chat-mode";
|
||||
import { useBrand } from "@/core/brand/provider";
|
||||
import { Welcome } from "@/components/workspace/welcome";
|
||||
import { getAPIClient } from "@/core/api";
|
||||
import { sanitizeArtifactPaths } from "@/core/artifacts/utils";
|
||||
@ -48,6 +49,7 @@ import motivationSlogans from "./motivation-slogans.json";
|
||||
|
||||
export default function ChatPage() {
|
||||
const { t } = useI18n();
|
||||
const { brand } = useBrand();
|
||||
useSpecificChatMode();
|
||||
const [sloganIndex, setSloganIndex] = useState(0);
|
||||
const [settings, setSettings] = useLocalSettings();
|
||||
@ -345,6 +347,7 @@ export default function ChatPage() {
|
||||
className={cn(
|
||||
"m-auto flex h-screen min-h-svh overflow-hidden rounded-t-[20px] transition-[width] duration-300 ease-in-out",
|
||||
artifactsOpen ? "w-full" : "w-[70%]",
|
||||
brand === "sxwz" && artifactsOpen === false && "translate-x-[-172px]",
|
||||
)}
|
||||
>
|
||||
<div className="relative flex size-full min-h-0 justify-between rounded-t-[20px]">
|
||||
@ -374,6 +377,7 @@ export default function ChatPage() {
|
||||
isChatting: false,
|
||||
});
|
||||
router.replace(`/workspace/chats/${threadId}?is_chatting=false`)
|
||||
setArtifactsOpen(false);
|
||||
}
|
||||
}
|
||||
>
|
||||
@ -575,6 +579,7 @@ export default function ChatPage() {
|
||||
className={cn(
|
||||
"pointer-events-auto relative w-full max-w-[720px]",
|
||||
showWelcomeStyle && "-translate-y-[calc(50vh-96px)]",
|
||||
brand === "sxwz" && "-translate-x-[172px]"
|
||||
)}
|
||||
>
|
||||
{!(showWelcomeStyle && thread.isThreadLoading) ? (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user