mirror of
https://github.com/brufdev/many-notes.git
synced 2026-05-20 00:58:50 -05:00
Improve collaboration and notification UX
This commit is contained in:
@@ -42,6 +42,7 @@ final class CollaborationInvite extends Component
|
||||
$user = $this->vault->user;
|
||||
$user->notify(new CollaborationAccepted($currentUser));
|
||||
$this->dispatch('notifications-refresh');
|
||||
$this->dispatch('vaults-refresh');
|
||||
$this->closeModal();
|
||||
$this->dispatch('toast', message: __('Invite accepted'), type: 'success');
|
||||
}
|
||||
|
||||
@@ -12,10 +12,12 @@ use App\Models\Vault;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Livewire\Attributes\On;
|
||||
use Livewire\Component;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
use Throwable;
|
||||
|
||||
#[On('vaults-refresh')]
|
||||
final class Index extends Component
|
||||
{
|
||||
public VaultForm $form;
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
<x-menu wide>
|
||||
<x-menu.button>
|
||||
<x-icons.bell class="w-5 h-5" />
|
||||
<span class="animate-ping absolute top-1 right-0.5 block h-1 w-1 rounded-full ring-2 ring-error-400 bg-error-600"></span>
|
||||
|
||||
@if (count($notifications))
|
||||
<span class="animate-ping absolute top-1 right-0.5 block h-1 w-1 rounded-full ring-2 ring-error-400 bg-error-600"></span>
|
||||
@endif
|
||||
</x-menu.button>
|
||||
|
||||
<x-menu.items>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<td class="text-right">
|
||||
<button title="{{ __('Delete') }}"
|
||||
wire:click="delete({{ $collaborator->id }})"
|
||||
wire:confirm="Are you sure you want to delete this invite?"
|
||||
wire:confirm="Are you sure you want to delete this collaborator?"
|
||||
>
|
||||
<x-icons.trash class="w-4 h-4" />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user