-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
592 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
- implement `database` provider | ||
- implement `Impersonation` resource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
return [ | ||
'buttons' => [ | ||
'enter' => [ | ||
'label' => 'Падмяніць карыстальніка', | ||
'message' => 'Вы паспяхова пераключыліся на іншага карыстальніка.', | ||
], | ||
'stop' => [ | ||
'label' => 'Спыніць падмену карыстальніка', | ||
'message' => 'Падмена карыстальніка была паспяхова спынена!', | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
return [ | ||
'enter' => [ | ||
'is_impersonating' => 'Вы ўжо ў рэжыме падмены карыстальніка. Спачатку спыніце бягучы рэжым падмены!', | ||
'cannot_impersonate' => 'У вас няма правоў для падмены іншых карыстальнікаў.', | ||
'cannot_be_impersonated' => 'Гэты карыстастальнік не можа быць падменены.', | ||
'id' => 'ID Карыстальніка', | ||
], | ||
'stop' => [ | ||
'is_not_impersonating' => 'Ніякі карыстастальнік не падменены. Няма чаго рабіць.', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<x-moonshine::link icon="{{ $icon }}" href="{{ $route }}" class="{{ $class }}"> | ||
{{ $label }} | ||
</x-moonshine::link> | ||
@if($canStop) | ||
<x-moonshine::link-button icon="{{ $icon }}" href="{{ $route }}" class="{{ $class }}"> | ||
{{ $label }} | ||
</x-moonshine::link-button> | ||
@endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
use Illuminate\Contracts\Support\Arrayable; | ||
use Illuminate\Contracts\View\View; | ||
use Jampire\MoonshineImpersonate\Support\Settings; | ||
use MoonShine\MoonShineUI; | ||
|
||
if (!function_exists('route_impersonate')) { | ||
/** | ||
|
@@ -52,3 +53,17 @@ function view_impersonate(string $key, array|Arrayable $data = [], array $mergeD | |
return view(Settings::ALIAS.'::'.$key, $data, $mergeData); | ||
} | ||
} | ||
|
||
if (!function_exists('toast_if')) { | ||
/** | ||
* @author Dzianis Kotau <[email protected]> | ||
*/ | ||
function toast_if(bool $condition, string $message, string $type = 'info'): void | ||
{ | ||
if (!$condition) { | ||
return; | ||
} | ||
|
||
MoonShineUI::toast(message: $message, type: $type); | ||
} | ||
} |
Oops, something went wrong.