mirror of
https://github.com/pelican-dev/panel.git
synced 2025-09-08 09:58:37 +02:00
cleanup merge mess
This commit is contained in:
parent
99c9e1fcb6
commit
9c3142d131
@ -505,55 +505,55 @@ class ListFiles extends ListRecords
|
|||||||
->log();
|
->log();
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect(ListFiles::getUrl(['path' => $this->path]));
|
return redirect(ListFiles::getUrl(['path' => $this->path]));
|
||||||
})
|
})
|
||||||
->form([
|
->schema([
|
||||||
Tabs::make()
|
Tabs::make()
|
||||||
->contained(false)
|
->contained(false)
|
||||||
->schema([
|
->schema([
|
||||||
Tab::make('from_files')
|
Tab::make('files')
|
||||||
->label(trans('server/file.actions.upload.from_files'))
|
->label(trans('server/file.actions.upload.from_files'))
|
||||||
->live()
|
->live()
|
||||||
->schema([
|
->schema([
|
||||||
FileUpload::make('files')
|
FileUpload::make('files')
|
||||||
->storeFiles(false)
|
->storeFiles(false)
|
||||||
->previewable(false)
|
->previewable(false)
|
||||||
->preserveFilenames()
|
->preserveFilenames()
|
||||||
->maxSize((int) round($server->node->upload_size * (config('panel.use_binary_prefix') ? 1.048576 * 1024 : 1000)))
|
->maxSize((int) round($server->node->upload_size * (config('panel.use_binary_prefix') ? 1.048576 * 1024 : 1000)))
|
||||||
->multiple(),
|
->multiple(),
|
||||||
]),
|
]),
|
||||||
Tab::make('url')
|
Tab::make('url')
|
||||||
->label(trans('server/file.actions.upload.url'))
|
->label(trans('server/file.actions.upload.url'))
|
||||||
->live()
|
->live()
|
||||||
->disabled(fn (Get $get) => count($get('files')) > 0)
|
->disabled(fn (Get $get) => count($get('files')) > 0)
|
||||||
->schema([
|
->schema([
|
||||||
TextInput::make('url')
|
TextInput::make('url')
|
||||||
->label(trans('server/file.actions.upload.url'))
|
->label(trans('server/file.actions.upload.url'))
|
||||||
->url(),
|
->url(),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
HeaderAction::make('search')
|
Action::make('search')
|
||||||
->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ, $server))
|
->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ, $server))
|
||||||
->hiddenLabel()->iconButton()->iconSize(IconSize::Large)
|
->hiddenLabel()->iconButton()->iconSize(IconSize::ExtraLarge)
|
||||||
->tooltip(trans('server/file.actions.global_search.title'))
|
->tooltip(trans('server/file.actions.global_search.title'))
|
||||||
->color('primary')
|
->color('primary')
|
||||||
->icon('tabler-world-search')
|
->icon('tabler-world-search')
|
||||||
->modalHeading(trans('server/file.actions.global_search.title'))
|
->modalHeading(trans('server/file.actions.global_search.title'))
|
||||||
->modalSubmitActionLabel(trans('server/file.actions.global_search.search'))
|
->modalSubmitActionLabel(trans('server/file.actions.global_search.search'))
|
||||||
->form([
|
->schema([
|
||||||
TextInput::make('searchTerm')
|
TextInput::make('searchTerm')
|
||||||
->label(trans('server/file.actions.global_search.search_term'))
|
->label(trans('server/file.actions.global_search.search_term'))
|
||||||
->placeholder(trans('server/file.actions.global_search.search_term_placeholder'))
|
->placeholder(trans('server/file.actions.global_search.search_term_placeholder'))
|
||||||
->required()
|
->required()
|
||||||
->regex('/^[^*]*\*?[^*]*$/')
|
->regex('/^[^*]*\*?[^*]*$/')
|
||||||
->minValue(3),
|
->minValue(3),
|
||||||
])
|
])
|
||||||
->action(fn ($data) => redirect(SearchFiles::getUrl([
|
->action(fn ($data) => redirect(SearchFiles::getUrl([
|
||||||
'searchTerm' => $data['searchTerm'],
|
'searchTerm' => $data['searchTerm'],
|
||||||
'path' => $this->path,
|
'path' => $this->path,
|
||||||
]))),
|
]))),
|
||||||
];
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user