File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,17 @@ import {
9
9
export const useStatefulProcess = <
10
10
SomeResult ,
11
11
> (
12
- tryToPerformFlaggableProcess : ( ) => Promise < SomeResult > ,
12
+ forciblyPerformFlaggableProcess : ( ) => Promise < SomeResult > ,
13
13
) : ( {
14
- try : ( ) => Promise < void > ;
14
+ initiate : ( ) => Promise < void > ;
15
15
isInProgress : boolean ;
16
16
result : SomeResult | null ;
17
17
} ) => {
18
18
const flagIsRaised = ref ( false ) ;
19
19
20
20
const capturedResult : Ref < SomeResult | null > = ref ( null ) ;
21
21
22
- const tryToPerformFlaggedProcess = async ( ) : Promise < void > => {
22
+ const forciblyPerformFlaggedProcess = async ( ) : Promise < void > => {
23
23
using cleanup = new DisposableStack ( ) ;
24
24
set ( flagIsRaised , true ) ;
25
25
@@ -28,12 +28,12 @@ export const useStatefulProcess = <
28
28
} ) ;
29
29
30
30
set ( capturedResult , null ) ;
31
- const resultOfProcess = await tryToPerformFlaggableProcess ( ) ;
31
+ const resultOfProcess = await forciblyPerformFlaggableProcess ( ) ;
32
32
set ( capturedResult , resultOfProcess ) ;
33
33
} ;
34
34
35
35
return {
36
- try : tryToPerformFlaggedProcess ,
36
+ initiate : forciblyPerformFlaggedProcess ,
37
37
get isInProgress ( ) {
38
38
return get ( flagIsRaised ) ;
39
39
} ,
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ const imageGeneration = useStatefulProcess(async () => {
67
67
<NavigationPanel >
68
68
<VForm
69
69
:disabled =" imageGeneration.isInProgress"
70
- @submit.prevent =" imageGeneration.try "
70
+ @submit.prevent =" imageGeneration.initiate "
71
71
>
72
72
<TextToImageInputSection
73
73
v-model =" currentPrompt"
You can’t perform that action at this time.
0 commit comments