mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
update
This commit is contained in:
parent
081b67f1ef
commit
207148a6a4
2 changed files with 13 additions and 3 deletions
|
@ -146,6 +146,17 @@ class ManageHostingSubscriptionFileManager extends ViewRecord implements HasTabl
|
|||
->checkIfRecordIsSelectableUsing(fn (FileItem $record): bool => ! $record->isPreviousPath())
|
||||
->headerActionsPosition(HeaderActionsPosition::Bottom)
|
||||
->headerActions([
|
||||
|
||||
Action::make('home')
|
||||
->label('Home')
|
||||
->action(fn () => $this->path = '')
|
||||
->icon('heroicon-o-home'),
|
||||
|
||||
Action::make('back')
|
||||
->label('Back')
|
||||
->action(fn () => $this->path = dirname($this->path))
|
||||
->icon('heroicon-o-arrow-left'),
|
||||
|
||||
Action::make('create_folder')
|
||||
->label('Create Folder')
|
||||
->icon('heroicon-o-folder-plus')
|
||||
|
|
|
@ -96,15 +96,14 @@ class FileItem extends Model
|
|||
'size' => null,
|
||||
'type' => 'Folder',
|
||||
'path' => $directory,
|
||||
]
|
||||
),
|
||||
]),
|
||||
...collect($storage->files(static::$path))
|
||||
->sort()
|
||||
->map(fn (string $file): array => [
|
||||
'name' => Str::remove(self::$path.'/', $file),
|
||||
'dateModified' => $storage->lastModified($file),
|
||||
'size' => $storage->size($file),
|
||||
'type' => $storage->mimeType($file) ?: null,
|
||||
'type' => $storage->mimeType($file) ?: 'File',
|
||||
'path' => $file,
|
||||
]
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue