mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
wip(desktop): progress
This commit is contained in:
parent
3a14ca044c
commit
acd91bddf7
2 changed files with 13 additions and 0 deletions
|
|
@ -185,6 +185,11 @@ export default function Page() {
|
|||
return
|
||||
}
|
||||
|
||||
// Don't interfere with dialogs
|
||||
if (dialog.stack.length > 0) {
|
||||
return
|
||||
}
|
||||
|
||||
const focused = document.activeElement === inputRef
|
||||
if (focused) {
|
||||
if (event.key === "Escape") {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,14 @@ export function Dialog(props: DialogProps) {
|
|||
...(props.classList ?? {}),
|
||||
[props.class ?? ""]: !!props.class,
|
||||
}}
|
||||
onOpenAutoFocus={(e) => {
|
||||
const target = e.currentTarget as HTMLElement | null
|
||||
const autofocusEl = target?.querySelector("[autofocus]") as HTMLElement | null
|
||||
if (autofocusEl) {
|
||||
e.preventDefault()
|
||||
autofocusEl.focus()
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Show when={props.title || props.action}>
|
||||
<div data-slot="dialog-header">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue