mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
darken background if sidebar open for small screen
This commit is contained in:
parent
c14bc86a5f
commit
93d262e2c8
1 changed files with 16 additions and 2 deletions
|
|
@ -22,6 +22,7 @@ import {
|
|||
ScrollBoxRenderable,
|
||||
addDefaultParsers,
|
||||
MacOSScrollAccel,
|
||||
RGBA,
|
||||
type ScrollAcceleration,
|
||||
} from "@opentui/core"
|
||||
import { Prompt, type PromptRef } from "@tui/component/prompt"
|
||||
|
|
@ -1024,8 +1025,21 @@ export function Session() {
|
|||
<Sidebar sessionID={route.sessionID} />
|
||||
</Show>
|
||||
<Show when={sidebarOverlay()}>
|
||||
<box position="absolute" right={0} top={0} height={dimensions().height} zIndex={100}>
|
||||
<Sidebar sessionID={route.sessionID} />
|
||||
<box
|
||||
position="absolute"
|
||||
left={0}
|
||||
top={0}
|
||||
width={dimensions().width}
|
||||
height={dimensions().height}
|
||||
backgroundColor={RGBA.fromInts(0, 0, 0, 150)}
|
||||
zIndex={100}
|
||||
flexDirection="row"
|
||||
justifyContent="flex-end"
|
||||
onMouseUp={() => setSidebar("hide")}
|
||||
>
|
||||
<box onMouseUp={(e) => e.stopPropagation()}>
|
||||
<Sidebar sessionID={route.sessionID} />
|
||||
</box>
|
||||
</box>
|
||||
</Show>
|
||||
</box>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue