Skip to content

Commit 73f44ab

Browse files
authored
feat: add speedtest button to metric dashboard (alexjustesen#2521)
1 parent 49fdce4 commit 73f44ab

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

app/Livewire/Topbar/Actions.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class Actions extends Component implements HasActions, HasForms
2121
{
2222
use InteractsWithActions, InteractsWithForms;
2323

24+
public bool $showDashboard = true;
25+
2426
public function dashboardAction(): Action
2527
{
2628
return Action::make('metrics')

resources/views/layouts/partials/header.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class="p-2 rounded-md transition-all"
5555
</div>
5656

5757
@auth
58+
<livewire:topbar.actions :showDashboard="false" />
59+
5860
<x-filament::button
5961
href="{{ url('/admin') }}"
6062
icon="tabler-layout-dashboard"

resources/views/livewire/topbar/actions.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<div class="flex items-center gap-4">
33
{{ $this->speedtestAction }}
44

5-
{{ $this->dashboardAction }}
6-
5+
@if ($showDashboard)
6+
{{ $this->dashboardAction }}
7+
@endif
78
</div>
89

910
<x-filament-actions::modals />

0 commit comments

Comments
 (0)