Skip to content

Commit

Permalink
update global search ui a bit
Browse files Browse the repository at this point in the history
(to be replaced with a custom page that is similar to the list files table)
  • Loading branch information
Boy132 committed Oct 7, 2024
1 parent bdf581e commit 4c70292
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions app/Filament/App/Resources/FileResource/Pages/ListFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ protected function getHeaderActions(): array
->label('Global Search')
->modalSubmitAction(false)
->modalCancelAction(false)
->form([
->form([ // TODO: replace modal with custom page
Wizard::make([
Step::make('Input')
->schema([
Expand All @@ -594,24 +594,31 @@ protected function getHeaderActions(): array
->deletable(false)
->reorderable(false)
->defaultItems(0)
->columns(5)
->columns(6)
->live()
->schema([ // TODO: make pretty and mobile friendly
->schema([
TextInput::make('name')
->hidden(),
TextInput::make('size')
->hidden(),
TextInput::make('symlink')
->hidden(),
TextInput::make('directory')
->hidden(),
Placeholder::make('icon')
->label('')
->content(fn (Get $get) => new HtmlString(Blade::render(<<<'BLADE'
<div @class(['fi-in-icon flex flex-wrap gap-1.5'])>
<x-filament::icon icon="{{ $icon }}" @class(['fi-in-icon-item', 'fi-in-icon-item-size-lg h-6 w-6', 'fi-color-custom text-custom-500 dark:text-custom-400', 'fi-color-primary'])/>
</div>
BLADE, ['icon' => $get('symlink') ? 'tabler-file-symlink' : 'tabler-file']))),
BLADE, ['icon' => $get('directory') ? 'tabler-folder' : ($get('symlink') ? 'tabler-file-symlink' : 'tabler-file')]))),
Placeholder::make('name')
->label('')
->content(fn (Get $get) => $get('name'))
->columnSpan(3),
Placeholder::make('size')
->label('')
->content(fn (Get $get) => $get('directory') ? '' : convert_bytes_to_readable($get('size'))),
Actions::make([
FormAction::make('edit')
->authorize(auth()->user()->can(Permission::ACTION_FILE_READ_CONTENT, Filament::getTenant()))
Expand Down

0 comments on commit 4c70292

Please sign in to comment.