-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Livewire V2 #23
Changes from 1 commit
79bef5c
a2d7450
34fa9ff
715d9b0
cf96081
dea8d26
38f8f08
243993b
de81b87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
<!-- Token Name --> | ||
<div class="col-span-6 sm:col-span-4"> | ||
<x-jet-label for="name" value="Token Name" /> | ||
<x-jet-input id="name" type="text" class="mt-1 block w-full" wire:model="createApiTokenForm.name" autofocus /> | ||
<x-jet-input id="name" type="text" class="mt-1 block w-full" wire:model.defer="createApiTokenForm.name" autofocus /> | ||
<x-jet-input-error for="name" class="mt-2" /> | ||
</div> | ||
|
||
|
@@ -39,7 +39,7 @@ | |
Created. | ||
</x-jet-action-message> | ||
|
||
<x-jet-button wire:loading.class="opacity-25" wire:loading.attr="disabled"> | ||
<x-jet-button> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Livewire automatically disables submit buttons on form submission. Also, because we added |
||
Create | ||
</x-jet-button> | ||
</x-slot> | ||
|
@@ -94,7 +94,7 @@ | |
@endif | ||
|
||
<!-- Token Value Modal --> | ||
<x-jet-dialog-modal show="displayingToken"> | ||
<x-jet-dialog-modal wire:model="displayingToken"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me
|
||
<x-slot name="title"> | ||
API Token | ||
</x-slot> | ||
|
@@ -110,14 +110,14 @@ | |
</x-slot> | ||
|
||
<x-slot name="footer"> | ||
<x-jet-secondary-button wire:click="$set('displayingToken', false)" wire:loading.class="opacity-25" wire:loading.attr="disabled"> | ||
<x-jet-secondary-button wire:click="$set('displayingToken', false)" wire:loading.attr="disabled"> | ||
Close | ||
</x-jet-secondary-button> | ||
</x-slot> | ||
</x-jet-dialog-modal> | ||
|
||
<!-- API Token Permissions Modal --> | ||
<x-jet-dialog-modal show="managingApiTokenPermissions"> | ||
<x-jet-dialog-modal wire:model="managingApiTokenPermissions"> | ||
<x-slot name="title"> | ||
API Token Permissions | ||
</x-slot> | ||
|
@@ -134,18 +134,18 @@ | |
</x-slot> | ||
|
||
<x-slot name="footer"> | ||
<x-jet-secondary-button wire:click="$set('managingApiTokenPermissions', false)" wire:loading.class="opacity-25" wire:loading.attr="disabled"> | ||
<x-jet-secondary-button wire:click="$set('managingApiTokenPermissions', false)" wire:loading.attr="disabled"> | ||
Nevermind | ||
</x-jet-secondary-button> | ||
|
||
<x-jet-button class="ml-2" wire:click="updateApiToken" wire:loading.class="opacity-25" wire:loading.attr="disabled"> | ||
<x-jet-button class="ml-2" wire:click="updateApiToken" wire:loading.attr="disabled"> | ||
Save | ||
</x-jet-button> | ||
</x-slot> | ||
</x-jet-dialog-modal> | ||
|
||
<!-- Delete Token Confirmation Modal --> | ||
<x-jet-confirmation-modal show="confirmingApiTokenDeletion"> | ||
<x-jet-confirmation-modal wire:model="confirmingApiTokenDeletion"> | ||
<x-slot name="title"> | ||
Delete API Token | ||
</x-slot> | ||
|
@@ -155,11 +155,11 @@ | |
</x-slot> | ||
|
||
<x-slot name="footer"> | ||
<x-jet-secondary-button wire:click="$toggle('confirmingApiTokenDeletion')" wire:loading.class="opacity-25" wire:loading.attr="disabled"> | ||
<x-jet-secondary-button wire:click="$toggle('confirmingApiTokenDeletion')" wire:loading.attr="disabled"> | ||
Nevermind | ||
</x-jet-secondary-button> | ||
|
||
<x-jet-danger-button class="ml-2" wire:click="deleteApiToken" wire:loading.class="opacity-25" wire:loading.attr="disabled"> | ||
<x-jet-danger-button class="ml-2" wire:click="deleteApiToken" wire:loading.attr="disabled"> | ||
Delete | ||
</x-jet-danger-button> | ||
</x-slot> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've deferred all input updating. This way network requests will only be sent when a user performs a meaningful action like pressing "Create".