desktop: add free limit + go usage exceeded dialogs to match tui (#27677)

This commit is contained in:
Brendan Allan 2026-05-18 15:20:08 +08:00 committed by GitHub
commit f80f3e33ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 270 additions and 1 deletions

View file

@ -10,6 +10,7 @@ import {
runWithOwner,
useContext,
type JSX,
startTransition,
} from "solid-js"
import { Dialog as Kobalte } from "@kobalte/core/dialog"
import { makeEventListener } from "@solid-primitives/event-listener"
@ -154,7 +155,7 @@ export function useDialog() {
},
show(element: DialogElement, onClose?: () => void) {
const base = ctx.active?.owner ?? owner
ctx.show(element, base, onClose)
return startTransition(() => ctx.show(element, base, onClose))
},
close() {
ctx.close()