mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 05:14:46 +02:00
feat(console): save command history in session (#1282)
This commit is contained in:
parent
b16e19b4fb
commit
6427903f9f
@ -11,6 +11,7 @@ use App\Services\Nodes\NodeJWTService;
|
|||||||
use App\Services\Servers\GetUserPermissionsService;
|
use App\Services\Servers\GetUserPermissionsService;
|
||||||
use Filament\Widgets\Widget;
|
use Filament\Widgets\Widget;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
|
use Livewire\Attributes\Session;
|
||||||
use Livewire\Attributes\On;
|
use Livewire\Attributes\On;
|
||||||
|
|
||||||
class ServerConsole extends Widget
|
class ServerConsole extends Widget
|
||||||
@ -26,6 +27,7 @@ class ServerConsole extends Widget
|
|||||||
public ?User $user = null;
|
public ?User $user = null;
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
|
#[Session(key: 'server.{server.id}.history')]
|
||||||
public array $history = [];
|
public array $history = [];
|
||||||
|
|
||||||
public int $historyIndex = 0;
|
public int $historyIndex = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user