fix: bar disappear bug

This commit is contained in:
qixinbo
2026-03-15 19:07:44 +08:00
parent 1e0a9e3c15
commit 219944f059
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -458,9 +458,9 @@ export function ChatInterface() {
}; };
return ( return (
<div className="h-full bg-white relative flex flex-col"> <div className="h-full min-h-0 bg-white flex flex-col">
{/* Top Bar */} {/* Top Bar */}
<div className="absolute top-0 left-0 w-full px-6 py-4 z-10 flex justify-between items-center"> <div className="sticky top-0 left-0 w-full px-6 py-4 z-20 flex justify-between items-center bg-white/95 backdrop-blur supports-[backdrop-filter]:bg-white/80 border-b border-zinc-100">
<Popover open={modelOpen} onOpenChange={setModelOpen}> <Popover open={modelOpen} onOpenChange={setModelOpen}>
<PopoverTrigger className="w-[200px] flex justify-between items-center bg-white/80 backdrop-blur-sm rounded-md px-3 py-2 text-sm hover:bg-zinc-50 hover:text-zinc-900 text-zinc-700 font-medium transition-all outline-none border-none shadow-none ring-0"> <PopoverTrigger className="w-[200px] flex justify-between items-center bg-white/80 backdrop-blur-sm rounded-md px-3 py-2 text-sm hover:bg-zinc-50 hover:text-zinc-900 text-zinc-700 font-medium transition-all outline-none border-none shadow-none ring-0">
{currentModel ? (currentModel.name || currentModel.model) : "选择模型..."} {currentModel ? (currentModel.name || currentModel.model) : "选择模型..."}
@@ -515,7 +515,7 @@ export function ChatInterface() {
</div> </div>
</div> </div>
<ScrollArea className="flex-1 h-[calc(100vh-100px)]"> <ScrollArea className="flex-1 min-h-0">
{/* Hidden file input available in all states */} {/* Hidden file input available in all states */}
<input <input
type="file" type="file"
@@ -624,7 +624,7 @@ export function ChatInterface() {
</div> </div>
</div> </div>
) : ( ) : (
<div className="max-w-3xl mx-auto pt-24 px-4 pb-48 space-y-8"> <div className="max-w-3xl mx-auto px-4 py-8 space-y-8">
{messages.map((msg) => ( {messages.map((msg) => (
<div <div
key={msg.id} key={msg.id}
@@ -681,7 +681,7 @@ export function ChatInterface() {
{/* Floating Input for Chat State */} {/* Floating Input for Chat State */}
{messages.length > 1 && ( {messages.length > 1 && (
<div className="absolute bottom-6 left-0 right-0 px-4"> <div className="px-4 pb-6 pt-3 border-t border-zinc-100 bg-white">
<div className="max-w-3xl mx-auto"> <div className="max-w-3xl mx-auto">
<div className="bg-white rounded-2xl shadow-xl border border-zinc-200/60 p-2 flex flex-col gap-2 ring-1 ring-zinc-100"> <div className="bg-white rounded-2xl shadow-xl border border-zinc-200/60 p-2 flex flex-col gap-2 ring-1 ring-zinc-100">
{activeDataFile && ( {activeDataFile && (
+2 -2
View File
@@ -321,7 +321,7 @@ function SidebarBody() {
}); });
return ( return (
<div className="h-full flex flex-col bg-zinc-50/30 border-r border-zinc-200 relative"> <div className="h-full min-h-0 flex flex-col bg-zinc-50/30 border-r border-zinc-200 relative">
{/* Header */} {/* Header */}
<div className="h-14 px-4 flex items-center justify-between border-b border-zinc-100"> <div className="h-14 px-4 flex items-center justify-between border-b border-zinc-100">
<Link to="/" className="flex items-center gap-1.5 text-zinc-700 font-bold text-lg hover:opacity-80 transition-opacity"> <Link to="/" className="flex items-center gap-1.5 text-zinc-700 font-bold text-lg hover:opacity-80 transition-opacity">
@@ -353,7 +353,7 @@ function SidebarBody() {
</Button> </Button>
</div> </div>
<ScrollArea className="flex-1"> <ScrollArea className="flex-1 min-h-0">
<div className="px-3 pt-4"> <div className="px-3 pt-4">
<div className="relative"> <div className="relative">
<Search className="h-4 w-4 text-zinc-400 absolute left-3 top-1/2 -translate-y-1/2" /> <Search className="h-4 w-4 text-zinc-400 absolute left-3 top-1/2 -translate-y-1/2" />