Skip to content

Commit

Permalink
disable submit while loading
Browse files Browse the repository at this point in the history
  • Loading branch information
zlayine committed Dec 5, 2023
1 parent 65bbec2 commit 9836c9a
Show file tree
Hide file tree
Showing 37 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion resources/js/components/batch/BatchMint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
>
Cancel
</RouterLink>
<Btn :loading="isLoading" primary is-submit>Batch Mint</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Batch Mint</Btn>
</div>
</div>
</Form>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/batch/BatchSetAttribute.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
>
Cancel
</RouterLink>
<Btn :loading="isLoading" primary is-submit>Batch Set Attribute</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Batch Set Attribute</Btn>
</div>
</Form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/batch/BatchTransfer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
>
Cancel
</RouterLink>
<Btn :loading="isLoading" primary is-submit>Batch Transfer</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Batch Transfer</Btn>
</div>
</div>
</Form>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/pages/create/CreateBeam.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
>
Cancel
</RouterLink>
<Btn :loading="isLoading" primary is-submit>Create</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Create</Btn>
</div>
</div>
</Form>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/pages/create/CreateCollection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
>
Cancel
</RouterLink>
<Btn :loading="isLoading" primary is-submit>Create</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Create</Btn>
</div>
</Form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/pages/create/CreateFuelTank.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
>
Cancel
</RouterLink>
<Btn :loading="isLoading" primary is-submit>Create</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Create</Btn>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/pages/create/CreateListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
>
Cancel
</RouterLink>
<Btn :loading="isLoading" primary is-submit>Create</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Create</Btn>
</div>
</Form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/pages/create/CreateToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
>
Cancel
</RouterLink>
<Btn :loading="isLoading" primary is-submit>Create</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Create</Btn>
</div>
</Form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Delete</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Delete</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Expire</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Expire</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Update</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Update</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Approve</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Approve</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>
{{ attributeActions.find((a) => a.value === attributeAction)?.btnText }}
</Btn>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Destroy</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Destroy</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Mutate</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Mutate</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Unapprove</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Unapprove</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Freeze</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Freeze</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Retry</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Retry</Btn>
</div>
</Form>
<ConfirmModal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Thaw</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Thaw</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4" v-if="actionType !== 'list'">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>
{{ actionType === 'add' ? 'Add' : 'Remove' }}
</Btn>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Set consumption</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Set consumption</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Destroy</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Destroy</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Dispatch</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Dispatch</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Freeze</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Freeze</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Mutate</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Mutate</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4" v-if="actionType !== 'list'">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>
{{ actionType === 'add' ? 'Add' : 'Remove' }}
</Btn>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Close</Btn>
<Btn :loading="isLoading" primary is-submit>Cancel Listing</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Cancel Listing</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Close</Btn>
<Btn :loading="isLoading" primary is-submit>Fill</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Fill</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Close</Btn>
<Btn :loading="isLoading" primary is-submit>Finalize Auction</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Finalize Auction</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Close</Btn>
<Btn :loading="isLoading" primary is-submit>Place Bid</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Place Bid</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Approve</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Approve</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>
{{ attributeActions.find((a) => a.value === attributeAction)?.btnText }}
</Btn>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Burn</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Burn</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Mint</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Mint</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Mutate</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Mutate</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Transfer</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Transfer</Btn>
</div>
</Form>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</div>
<div class="flex space-x-3 flex-shrink-0 justify-end px-4 py-4">
<Btn @click="closeSlide">Cancel</Btn>
<Btn :loading="isLoading" primary is-submit>Unapprove</Btn>
<Btn :loading="isLoading" :disabled="isLoading" primary is-submit>Unapprove</Btn>
</div>
</Form>
</template>
Expand Down

0 comments on commit 9836c9a

Please sign in to comment.