Skip to content

Commit

Permalink
Buttons updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Jampire committed Dec 22, 2023
1 parent 4148f4c commit c93fced
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release Notes for 2.x

## [2.0.1 (2023-12-23)](https://github.com/Jampire/moonshine-impersonate/compare/v2.0.0...v2.0.1)

### Fixes

- Enter Action updates ([#28](https://github.com/Jampire/moonshine-impersonate/pull/28))

## [2.0.0 (2023-12-17)](https://github.com/Jampire/moonshine-impersonate/compare/v1.4.1...v2.0.0)

### Adds
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/EnterAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
final class EnterAction
{
public function __construct(
public readonly ImpersonateManager $manager
private readonly ImpersonateManager $manager
) {
//
}
Expand Down
4 changes: 2 additions & 2 deletions src/UI/ActionButtons/EnterImpersonationActionButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Jampire\MoonshineImpersonate\UI\ActionButtons;

use Illuminate\Contracts\Auth\Authenticatable;
use Jampire\MoonshineImpersonate\Actions\EnterAction;
use Jampire\MoonshineImpersonate\Services\ImpersonateManager;
use MoonShine\ActionButtons\ActionButton;

/**
Expand All @@ -24,7 +24,7 @@ public static function resolve(): ActionButton
]),
)
->canSee(
callback: fn (Authenticatable $item): bool => app(EnterAction::class)->manager->canEnter($item),
callback: fn (Authenticatable $item): bool => app(ImpersonateManager::class)->canEnter($item),
)
->icon(config_impersonate('buttons.enter.icon'));
}
Expand Down

0 comments on commit c93fced

Please sign in to comment.