Release v1.1.0 #79
2 changed files with 2 additions and 7 deletions
|
|
@ -36,13 +36,7 @@ public function refresh(): void
|
|||
|
||||
ArticleDiscoveryJob::dispatch();
|
||||
|
||||
// Reset after 10 seconds
|
||||
$this->dispatch('refresh-complete')->self();
|
||||
}
|
||||
|
||||
public function refreshComplete(): void
|
||||
{
|
||||
$this->isRefreshing = false;
|
||||
$this->dispatch('refresh-started');
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
wire:click="refresh"
|
||||
wire:loading.attr="disabled"
|
||||
@disabled($isRefreshing)
|
||||
x-on:refresh-started.window="setTimeout(() => window.location.reload(), 10000)"
|
||||
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
>
|
||||
<svg class="h-4 w-4 mr-2 {{ $isRefreshing ? 'animate-spin' : '' }}" wire:loading.class="animate-spin" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
|
|
|
|||
Loading…
Reference in a new issue