Copy invite link
Some checks failed
tests / ci (push) Waiting to run
linter / quality (push) Has been cancelled

This commit is contained in:
Javier Feliz 2025-08-02 01:16:02 -04:00
parent f2b4860d00
commit 9e778adc51

View File

@ -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>