mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-08-21 06:13:26 +00:00
fix(ui): auto-close permission center when queue empty
This commit is contained in:
parent
df9fc529f9
commit
e30c8b0253
1 changed files with 7 additions and 0 deletions
|
|
@ -120,6 +120,13 @@ const PermissionApprovalModal: Component<PermissionApprovalModalProps> = (props)
|
|||
onCleanup(() => document.removeEventListener("keydown", closeOnEscape))
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
if (!props.isOpen) return
|
||||
if (queue().length === 0) {
|
||||
props.onClose()
|
||||
}
|
||||
})
|
||||
|
||||
function handleBackdropClick(event: MouseEvent) {
|
||||
if (event.target === event.currentTarget) {
|
||||
props.onClose()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue