fix: center bottom composer between sidebar and teachers

This commit is contained in:
鲨鱼辣椒
2026-09-29 16:15:05 +08:00
parent e812371973
commit 521e1ee167
8 changed files with 78 additions and 15 deletions

View File

@@ -27,7 +27,9 @@ export function Layout() {
dismissWelcome: (id: string) => setDismissed(values => [...values, id]),
dismissWelcomes: () => setDismissed(['0', '1']),
} as ComponentProps<typeof TeacherCompanion>['companion'];
return <div className="classroom-workspace flex h-screen flex-col bg-white">
return <div className="flex h-screen">
{new URLSearchParams(location.search).has('sidebar') && <aside data-testid="project-sidebar" className="shrink-0 border-r p-4 text-sm" style={{ width: 210, background: '#f1f6fc' }}>我的项目</aside>}
<div className="classroom-workspace flex min-w-0 flex-1 flex-col bg-white">
<header className="relative z-50 flex h-12 shrink-0 items-center justify-end border-b px-3" data-testid="coding-conversation-header">
<span className="mr-auto min-w-0 truncate text-xs">测试项目 › 新对话</span>
<TeacherCompanion companion={companion} open={false} onOpen={() => {}} onToggle={() => {}} bubbleRef={setBubble} />
@@ -35,8 +37,9 @@ export function Layout() {
<main className="classroom-main flex min-h-0 min-w-0 flex-1 flex-col">
<div className="classroom-tabs" role="tablist"><button role="tab" aria-selected="true">操作对话</button><button role="tab">作品</button></div>
<CodingChatBody welcome={!sent} hidden={false} bubble={bubble}>
<div className="classroom-chat-view min-h-0 flex-1 flex-col">{!sent ? <><CodingStartHeading /><CommunityInvitation /></> : <p>第一条消息已发送(测试)</p>}</div>
<div className="classroom-chat-view min-h-0 flex-1 flex-col">{!sent ? <CodingStartHeading /> : <p>第一条消息已发送(测试)</p>}</div>
<div className="classroom-composer-view shrink-0">
{!sent && <CommunityInvitation />}
<CodingComposer value={draft} editable canSend={Boolean(draft)} preparing={false} recovering={false}
runStatus="idle" mode="prompt" queue={{ items: [] }} error={null} recoverableError={false}
attachments={[]} submitting={false} placeholder="说说你的想法,接下来想做什么?" onChange={setDraft}
@@ -45,6 +48,6 @@ export function Layout() {
</div>
</CodingChatBody>
</main>
</div>;
</div></div>;
}
createRoot(document.getElementById('root')!).render(<Layout />);