mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 18:57:17 +03:00
fix(app): slide the side panel shut when its last tab closes (#62758)
This commit is contained in:
committed by
GitHub
Unverified
parent
cf3381e0d4
commit
ff4a652d1b
@@ -93,12 +93,11 @@ function SessionScreenContent(props: {
|
||||
closed: attachment.closed,
|
||||
open: (key) => attachment.openTab(key, props.view()),
|
||||
side: () => session.layout.view().side,
|
||||
// Closing the last tab closes the side region, which opens with a new tab next time. The user's own hand closed
|
||||
// it, so it goes at once.
|
||||
// Closing the last tab closes the side region, which opens with a new tab next time. It slides shut as the toggle
|
||||
// closes it.
|
||||
onEmptied: () => {
|
||||
if (!session.layout.view().side.opened()) return
|
||||
session.layout.view().side.toggle()
|
||||
sideMotion.sync(false)
|
||||
},
|
||||
settled: (run) => sideMotion.whenSettled(run),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user