File tree Expand file tree Collapse file tree
types/foundry/client-esm/applications/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ async function getNestedEffectSelection(
2323 } ,
2424 ) ;
2525
26- const choice = ( await DialogV2 . wait ( {
26+ const choice = ( await DialogV2 . prompt ( {
2727 id : "nested-effect-selection-dialog" ,
2828 window : {
2929 title : effectData . name ,
@@ -36,24 +36,18 @@ async function getNestedEffectSelection(
3636 return null ;
3737 } ,
3838 content,
39- buttons : [
40- {
41- action : "ok" ,
42- label : "ConvenientEffects.SelectEffect" ,
43- icon : "fa-solid fa-check" ,
44- callback : async (
45- _event : PointerEvent | SubmitEvent ,
46- _button : HTMLButtonElement ,
47- dialog : HTMLDialogElement ,
48- ) => {
49- const htmlChoice = $ ( dialog )
50- . find ( 'select[name="effect-choice"]' )
51- . val ( ) ;
52- return htmlChoice ;
53- } ,
54- default : true ,
39+ ok : {
40+ action : "ok" ,
41+ label : "ConvenientEffects.SelectEffect" ,
42+ icon : "fa-solid fa-check" ,
43+ callback : async ( _event , _button , dialog ) => {
44+ const htmlChoice = $ ( dialog . element )
45+ . find ( 'select[name="effect-choice"]' )
46+ . val ( ) ;
47+ return htmlChoice ;
5548 } ,
56- ] ,
49+ default : true ,
50+ } ,
5751 } ) ) as string | undefined ;
5852
5953 return nestedEffects . find ( ( nestedEffect ) => nestedEffect . name === choice ) ;
Original file line number Diff line number Diff line change @@ -152,18 +152,15 @@ export interface DialogV2WaitOptions {
152152export type DialogV2ButtonCallback = (
153153 event : PointerEvent | SubmitEvent ,
154154 button : HTMLButtonElement ,
155- dialog : HTMLDialogElement ,
155+ dialog : DialogV2 ,
156156) => Promise < unknown > ;
157157
158158/**
159159 * A dialog render handler method.
160160 * @param event The render event.
161161 * @param dialog The dialog element.
162162 */
163- export type DialogV2RenderCallback = (
164- event : Event ,
165- dialog : HTMLDialogElement ,
166- ) => void ;
163+ export type DialogV2RenderCallback = ( event : Event , dialog : DialogV2 ) => void ;
167164
168165/**
169166 * @param event The close event
You can’t perform that action at this time.
0 commit comments