generated from thegrind/laravel-dockerized
Copy invite link
This commit is contained in:
parent
f2b4860d00
commit
9e778adc51
@ -68,9 +68,17 @@
|
||||
@endswitch
|
||||
</div>
|
||||
<div class="flex gap-2 items-center">
|
||||
<flux:button variant="primary" size="sm">Copy invite link</flux:button>
|
||||
@if($inv->isPending())
|
||||
<flux:button variant="danger" size="sm" icon="trash" wire:click="deleteInvitation({{ $inv->id }})" />
|
||||
<flux:button x-data="{copied: false}" variant="primary" size="sm" x-on:click="
|
||||
navigator.clipboard.writeText('{{ $inv->getInviteUrl() }}').then(() => {
|
||||
copied = true;
|
||||
setTimeout(() => copied = false, 2000);
|
||||
});
|
||||
">
|
||||
<span x-show="!copied">Copy invite link</span>
|
||||
<span x-show="copied">Copied!</span>
|
||||
</flux:button>
|
||||
<flux:button variant="danger" size="sm" icon="trash" wire:click="deleteInvitation({{ $inv->id }})" />
|
||||
@endif
|
||||
</div>
|
||||
</x-card>
|
||||
|
Loading…
x
Reference in New Issue
Block a user