Skip to content

Commit

Permalink
Merge branch 'main' of github.com:stephenjude/filament-debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenjude committed Sep 22, 2024
2 parents 2e12554 + 32960c2 commit 15e25fb
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/DebuggerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function boot(Panel $panel): void
$panel->navigationItems([
$this->getHorizonNavigation(),
$this->getPulseNavigation(),
$this->getTelescopeNavigation()
$this->getTelescopeNavigation(),
]);
}
}
1 change: 0 additions & 1 deletion src/DebuggerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Stephenjude\FilamentDebugger;

use Closure;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

Expand Down
4 changes: 2 additions & 2 deletions src/Traits/HasGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ trait HasGroup
{
use EvaluatesClosures;

public Closure|bool $groupNavigation = true;
public Closure | bool $groupNavigation = true;

public string $groupNavigationLabel = 'Debuggers';

public function groupNavigation(Closure|bool $condition = true, string $label = 'Debuggers'): static
public function groupNavigation(Closure | bool $condition = true, string $label = 'Debuggers'): static
{
$this->groupNavigation = $condition;

Expand Down
12 changes: 6 additions & 6 deletions src/Traits/HasHorizon.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ trait HasHorizon
{
use EvaluatesClosures;

public Closure|bool $hasHorizon = true;
public Closure | bool $hasHorizon = true;

public string $horizonLabel;

public string $horizonIcon;

public string $horizonUrl;

public Closure|bool $horizonOpenInNewTab = true;
public Closure | bool $horizonOpenInNewTab = true;

private function getHorizonNavigation(): NavigationItem
{
return NavigationItem::make()
->visible(fn() => $this->hasHorizon() && $this->authorized() )
->group(fn() => $this->hasGroupNavigation() ? $this->getGroupNavigationLabel() : null)
->visible(fn () => $this->hasHorizon() && $this->authorized())
->group(fn () => $this->hasGroupNavigation() ? $this->getGroupNavigationLabel() : null)
->url(url: $this->getHorizonUrl(), shouldOpenInNewTab: $this->getHorizonOpenInNewTab())
->icon(icon: $this->getHorizonIcon())
->label(label: $this->getHorizonLabel());
}

public function horizonNavigation(
Closure|bool $condition = true,
Closure | bool $condition = true,
string $label = 'Horizon',
string $icon = 'heroicon-o-globe-europe-africa',
string $url = 'horizon',
Closure|bool $openInNewTab = true
Closure | bool $openInNewTab = true
): static {
$this->hasHorizon = $condition;

Expand Down
12 changes: 6 additions & 6 deletions src/Traits/HasPulse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ trait HasPulse
{
use EvaluatesClosures;

public Closure|bool $hasPulse = true;
public Closure | bool $hasPulse = true;

public string $pulseLabel;

public string $pulseIcon;

public string $pulseUrl;

public Closure|bool $pulseOpenInNewTab = true;
public Closure | bool $pulseOpenInNewTab = true;

public function pulseNavigation(
Closure|bool $condition = true,
Closure | bool $condition = true,
string $label = 'Pulse',
string $icon = 'heroicon-o-bolt',
string $url = 'pulse',
Closure|bool $openInNewTab = true
Closure | bool $openInNewTab = true
): static {
$this->hasPulse = $condition;

Expand All @@ -48,8 +48,8 @@ public function hasPulse(): bool
private function getPulseNavigation(): NavigationItem
{
return NavigationItem::make()
->visible(fn() => $this->hasPulse() && $this->authorized())
->group(fn() => $this->hasGroupNavigation() ? $this->getGroupNavigationLabel() : null)
->visible(fn () => $this->hasPulse() && $this->authorized())
->group(fn () => $this->hasGroupNavigation() ? $this->getGroupNavigationLabel() : null)
->url(url: $this->getPulseUrl(), shouldOpenInNewTab: $this->getPulseOpenInNewTab())
->icon(icon: $this->getPulseIcon())
->label(label: $this->getPulseLabel());
Expand Down
12 changes: 6 additions & 6 deletions src/Traits/HasTelescope.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ trait HasTelescope
{
use EvaluatesClosures;

public Closure|bool $hasTelescope = true;
public Closure | bool $hasTelescope = true;

public string $telescopeLabel;

public string $telescopeIcon;

public string $telescopeUrl;

public Closure|bool $telescopeOpenInNewTab = true;
public Closure | bool $telescopeOpenInNewTab = true;

public function telescopeNavigation(
Closure|bool $condition = true,
Closure | bool $condition = true,
string $label = 'Telescope',
string $icon = 'heroicon-o-sparkles',
string $url = 'telescope',
Closure|bool $openInNewTab = true
Closure | bool $openInNewTab = true
): static {
$this->hasTelescope = $condition;

Expand All @@ -48,8 +48,8 @@ public function hasTelescope(): bool
private function getTelescopeNavigation(): NavigationItem
{
return NavigationItem::make()
->visible(fn() => $this->hasTelescope() && $this->authorized())
->group(fn() => $this->hasGroupNavigation() ? $this->getGroupNavigationLabel() : null)
->visible(fn () => $this->hasTelescope() && $this->authorized())
->group(fn () => $this->hasGroupNavigation() ? $this->getGroupNavigationLabel() : null)
->url(url: $this->getTelescopeUrl(), shouldOpenInNewTab: $this->getTelescopeOpenInNewTab())
->icon(icon: $this->getTelescopeIcon())
->label(label: $this->getTelescopeLabel());
Expand Down

0 comments on commit 15e25fb

Please sign in to comment.