mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 12:14:45 +02:00
Cleanup files mount and fix path for global search (#1341)
This commit is contained in:
parent
85d625d118
commit
292523d153
@ -46,17 +46,10 @@ class ListFiles extends ListRecords
|
|||||||
protected static string $resource = FileResource::class;
|
protected static string $resource = FileResource::class;
|
||||||
|
|
||||||
#[Locked]
|
#[Locked]
|
||||||
public string $path;
|
public string $path = '/';
|
||||||
|
|
||||||
private DaemonFileRepository $fileRepository;
|
private DaemonFileRepository $fileRepository;
|
||||||
|
|
||||||
public function mount(?string $path = null): void
|
|
||||||
{
|
|
||||||
parent::mount();
|
|
||||||
|
|
||||||
$this->path = $path ?? '/';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getBreadcrumbs(): array
|
public function getBreadcrumbs(): array
|
||||||
{
|
{
|
||||||
$resource = static::getResource();
|
$resource = static::getResource();
|
||||||
|
@ -12,6 +12,7 @@ use Filament\Resources\Pages\ListRecords;
|
|||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
use Livewire\Attributes\Locked;
|
use Livewire\Attributes\Locked;
|
||||||
|
use Livewire\Attributes\Url;
|
||||||
|
|
||||||
class SearchFiles extends ListRecords
|
class SearchFiles extends ListRecords
|
||||||
{
|
{
|
||||||
@ -22,15 +23,8 @@ class SearchFiles extends ListRecords
|
|||||||
#[Locked]
|
#[Locked]
|
||||||
public string $searchTerm;
|
public string $searchTerm;
|
||||||
|
|
||||||
#[Locked]
|
#[Url]
|
||||||
public string $path;
|
public string $path = '/';
|
||||||
|
|
||||||
public function mount(?string $searchTerm = null, ?string $path = null): void
|
|
||||||
{
|
|
||||||
parent::mount();
|
|
||||||
$this->searchTerm = $searchTerm;
|
|
||||||
$this->path = $path ?? '/';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getBreadcrumbs(): array
|
public function getBreadcrumbs(): array
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user