fix: anchor active session detail to sidebar edge

This commit is contained in:
2026-05-19 18:25:53 +08:00
parent 36e5e1959f
commit aa1169c9e4

View File

@@ -102,7 +102,7 @@ export default function Sidebar({
const activeSession = sessions.find(session => session.id === currentId) ?? null; const activeSession = sessions.find(session => session.id === currentId) ?? null;
return ( return (
<aside className="flex shrink-0 items-stretch"> <aside className="relative flex shrink-0 items-stretch overflow-visible">
<div className="glass-sidebar w-72 shrink-0 flex flex-col"> <div className="glass-sidebar w-72 shrink-0 flex flex-col">
<div className="px-4 pt-5 pb-3 flex items-center gap-3"> <div className="px-4 pt-5 pb-3 flex items-center gap-3">
<div className="w-8 h-8 rounded-[8px] bg-gradient-to-br from-[#e6f578] to-[#d6b36a] flex items-center justify-center shadow-glow-violet"> <div className="w-8 h-8 rounded-[8px] bg-gradient-to-br from-[#e6f578] to-[#d6b36a] flex items-center justify-center shadow-glow-violet">
@@ -188,16 +188,18 @@ export default function Sidebar({
</div> </div>
{activeSession && ( {activeSession && (
<div className="glass-sidebar w-72 shrink-0 border-l border-[#e6f578]/10"> <div className="absolute left-[calc(100%-1px)] top-0 z-20 w-80 pl-3">
<div className="h-full overflow-y-auto px-4 py-5"> <div className="glass-sidebar relative overflow-hidden rounded-[8px] border-l border-[#e6f578]/10 shadow-[0_30px_80px_-40px_rgba(0,0,0,0.9)]">
<div className="mb-3 flex items-center justify-between gap-3"> <div className="h-full overflow-y-auto px-4 py-5">
<div> <div className="mb-3 flex items-center justify-between gap-3">
<div className="text-[10px] font-semibold uppercase tracking-[0.18em] text-[#e6f578]/70">Detail</div> <div>
<div className="mt-1 text-[12px] text-white/45"></div> <div className="text-[10px] font-semibold uppercase tracking-[0.18em] text-[#e6f578]/70">Detail</div>
<div className="mt-1 text-[12px] text-white/45"></div>
</div>
<span className="h-2 w-2 rounded-full bg-[#e6f578] shadow-[0_0_18px_rgba(230,245,120,0.75)]" />
</div> </div>
<span className="h-2 w-2 rounded-full bg-[#e6f578] shadow-[0_0_18px_rgba(230,245,120,0.75)]" /> <ActiveSessionDetail session={activeSession} />
</div> </div>
<ActiveSessionDetail session={activeSession} />
</div> </div>
</div> </div>
)} )}