@@ -401,7 +401,7 @@ export function LLMGenerationPopupV2() {
401
401
402
402
return (
403
403
< >
404
- < div className = "absolute bottom-[16px] right -[16px] min-w-[370px] pointer-events-none flex justify-center items-center" >
404
+ < div className = "absolute bottom-[16px] left -[16px] min-w-[370px] pointer-events-none flex justify-center items-center" >
405
405
< div className = "w-full h-full max-h-[calc(100dvh-72px-48px)] flex flex-col justify-center items-end bg-white text-black border border-[#c9c9c9] " >
406
406
< div className = "flex justify-between items-center w-full px-[24px] py-[29px] font-inter font-light text-[24px] uppercase border-b border-[#c9c9c9] pointer-events-auto" >
407
407
< div >
@@ -604,7 +604,9 @@ export function LLMGenerationPopupV2() {
604
604
id = "llm-prompt-textarea"
605
605
className = "rounded-none !border-black !shadow-none resize-none"
606
606
value = { prompt }
607
- disabled = { mutationGenerate . isPending }
607
+ disabled = {
608
+ mutationGenerate . isPending || mutationEdit . isPending
609
+ }
608
610
onFocus = { ( ) => {
609
611
window . weaveOnFieldFocus = true ;
610
612
} }
@@ -628,7 +630,9 @@ export function LLMGenerationPopupV2() {
628
630
onValueChange = { ( value ) =>
629
631
setModeration ( value as ImageModeration )
630
632
}
631
- disabled = { mutationGenerate . isPending }
633
+ disabled = {
634
+ mutationGenerate . isPending || mutationEdit . isPending
635
+ }
632
636
>
633
637
< SelectTrigger className = "font-inter text-xs rounded-none !h-[30px] !border-black !shadow-none" >
634
638
< SelectValue placeholder = "Moderation" />
@@ -666,7 +670,9 @@ export function LLMGenerationPopupV2() {
666
670
onValueChange = { ( value ) =>
667
671
setQuality ( value as ImageQuality )
668
672
}
669
- disabled = { mutationGenerate . isPending }
673
+ disabled = {
674
+ mutationGenerate . isPending || mutationEdit . isPending
675
+ }
670
676
>
671
677
< SelectTrigger className = "font-inter text-xs rounded-none !h-[30px] !border-black !shadow-none" >
672
678
< SelectValue placeholder = "Size" />
@@ -708,7 +714,9 @@ export function LLMGenerationPopupV2() {
708
714
< Select
709
715
value = { size }
710
716
onValueChange = { ( value ) => setSize ( value as ImageSize ) }
711
- disabled = { mutationGenerate . isPending }
717
+ disabled = {
718
+ mutationGenerate . isPending || mutationEdit . isPending
719
+ }
712
720
>
713
721
< SelectTrigger className = "font-inter text-xs rounded-none !h-[30px] !border-black !shadow-none" >
714
722
< SelectValue placeholder = "Size" />
@@ -750,7 +758,9 @@ export function LLMGenerationPopupV2() {
750
758
< Select
751
759
value = { imageSamples }
752
760
onValueChange = { setImageSamples }
753
- disabled = { mutationGenerate . isPending }
761
+ disabled = {
762
+ mutationGenerate . isPending || mutationEdit . isPending
763
+ }
754
764
>
755
765
< SelectTrigger className = "font-inter text-xs rounded-none !h-[30px] !border-black !shadow-none" >
756
766
< SelectValue placeholder = "Amount" />
@@ -808,6 +818,7 @@ export function LLMGenerationPopupV2() {
808
818
< Button
809
819
className = "uppercase cursor-pointer font-inter rounded-none"
810
820
variant = "secondary"
821
+ disabled = { mutationGenerate . isPending || mutationEdit . isPending }
811
822
onClick = { async ( ) => {
812
823
setImagesReferences ( [ ] ) ;
813
824
setPrompt ( "" ) ;
@@ -824,23 +835,19 @@ export function LLMGenerationPopupV2() {
824
835
< Button
825
836
className = "uppercase cursor-pointer font-inter rounded-none"
826
837
disabled = {
838
+ mutationGenerate . isPending ||
839
+ mutationEdit . isPending ||
827
840
( [ "create" ] . includes ( imagesLLMPopupType ) &&
828
- ( mutationGenerate . isPending ||
829
- ! prompt ||
830
- prompt . length === 0 ) ) ||
841
+ ( ! prompt || prompt . length === 0 ) ) ||
831
842
( [ "edit-prompt" ] . includes ( imagesLLMPopupType ) &&
832
- ( mutationGenerate . isPending ||
833
- ! prompt ||
834
- prompt . length === 0 ) ) ||
843
+ ( ! prompt || prompt . length === 0 ) ) ||
835
844
( [ "edit-variation" ] . includes ( imagesLLMPopupType ) &&
836
- ( mutationGenerate . isPending ||
837
- ! prompt ||
845
+ ( ! prompt ||
838
846
prompt . length === 0 ||
839
847
! imageReferences ||
840
848
( imageReferences && imageReferences . length === 0 ) ) ) ||
841
849
( [ "edit-mask" ] . includes ( imagesLLMPopupType ) &&
842
- ( mutationGenerate . isPending ||
843
- ! prompt ||
850
+ ( ! prompt ||
844
851
prompt . length === 0 ||
845
852
! actualMaskBase64 ||
846
853
actualMaskBase64 . length === 0 ) )
@@ -865,7 +872,9 @@ export function LLMGenerationPopupV2() {
865
872
} , 100 ) ;
866
873
} }
867
874
>
868
- { buttonText }
875
+ { mutationGenerate . isPending || mutationEdit . isPending
876
+ ? "REQUESTING"
877
+ : buttonText }
869
878
</ Button >
870
879
</ div >
871
880
</ div >
0 commit comments