mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-21 17:21:40 +00:00
ui(storage): enhance file storage management with new properties and UI improvements
- Added properties to manage file and directory counts, improving data handling in the Livewire component. - Updated the file storage view to include a tabbed interface for volumes, files, and directories, enhancing user navigation. - Improved UI layout for better readability and user experience, including consistent styling and informative messages.
This commit is contained in:
@@ -39,7 +39,32 @@ class Storage extends Component
|
||||
public function refreshStorages()
|
||||
{
|
||||
$this->fileStorage = $this->resource->fileStorages()->get();
|
||||
$this->dispatch('$refresh');
|
||||
$this->resource->refresh();
|
||||
}
|
||||
|
||||
public function getFilesProperty()
|
||||
{
|
||||
return $this->fileStorage->where('is_directory', false);
|
||||
}
|
||||
|
||||
public function getDirectoriesProperty()
|
||||
{
|
||||
return $this->fileStorage->where('is_directory', true);
|
||||
}
|
||||
|
||||
public function getVolumeCountProperty()
|
||||
{
|
||||
return $this->resource->persistentStorages()->count();
|
||||
}
|
||||
|
||||
public function getFileCountProperty()
|
||||
{
|
||||
return $this->files->count();
|
||||
}
|
||||
|
||||
public function getDirectoryCountProperty()
|
||||
{
|
||||
return $this->directories->count();
|
||||
}
|
||||
|
||||
public function addNewVolume($data)
|
||||
|
||||
Reference in New Issue
Block a user