From 3a03641c3411adb0657cfd48948b4e8f3fcf3b1d Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Mon, 13 May 2024 17:18:57 +0300 Subject: [PATCH] update --- web/app/Livewire/FileManager.php | 2 +- .../livewire/file-manager/index.blade.php | 221 ++++++++++-------- 2 files changed, 126 insertions(+), 97 deletions(-) diff --git a/web/app/Livewire/FileManager.php b/web/app/Livewire/FileManager.php index 17edb4b..3251b18 100644 --- a/web/app/Livewire/FileManager.php +++ b/web/app/Livewire/FileManager.php @@ -54,7 +54,7 @@ class FileManager extends Component public function back() { $this->canIBack = false; - + $newRealPath = dirname($this->currentRealPath); if (Str::startsWith($newRealPath, $this->domainHomeRoot)) { $this->currentRealPath = $newRealPath; diff --git a/web/resources/views/livewire/file-manager/index.blade.php b/web/resources/views/livewire/file-manager/index.blade.php index 4b0b634..9a6126f 100644 --- a/web/resources/views/livewire/file-manager/index.blade.php +++ b/web/resources/views/livewire/file-manager/index.blade.php @@ -3,7 +3,7 @@
- Back + Back @@ -23,7 +23,8 @@
- +
@@ -54,113 +55,141 @@ Upload - - +
-
+
+ + - - - - - - - - + + + + + + + + @if($canIBack) - - - + + + @endif @if(!empty($files)) - @foreach($files as $file) - - - - - - - - - @endforeach + @foreach($files as $file) + + + + + + + + + @endforeach @endif
#NameSizeLast modifiedOwner/GroupPermission
#NameSizeLast modifiedOwner/GroupPermission
-
- - - - Back to parent folder -
-
+
+ + + + Back to parent folder +
+
-
- @if($file['name'] == 'public_html') - - - - @elseif($file['is_dir']) - - - - @elseif($file['extension'] == 'zip') - - - - @elseif ($file['extension'] == 'txt') - - - - @elseif($file['extension'] == 'gz') - - - - @elseif($file['extension'] == 'php') - - - - @elseif($file['extension'] == 'html') - - - - @elseif($file['extension'] == 'css') - - - - @elseif($file['extension'] == 'js') - - - - @elseif($file['extension'] == 'json') - - - - @elseif($file['extension'] == 'jpg' || $file['extension'] == 'jpeg' || $file['extension'] == 'png' || $file['extension'] == 'gif') - - - - @else - - - - @endif -
-
- {{ $file['name'] }} - - {{ $file['size'] }} - - {{$file['last_modified']}} - - {{$file['owner']}} / {{$file['group']}} - - {{$file['permission']}} -
+
+ @if($file['name'] == 'public_html') + + + + @elseif($file['is_dir']) + + + + @elseif($file['extension'] == 'zip') + + + + @elseif ($file['extension'] == 'txt') + + + + @elseif($file['extension'] == 'gz') + + + + @elseif($file['extension'] == 'php') + + + + @elseif($file['extension'] == 'html') + + + + @elseif($file['extension'] == 'css') + + + + @elseif($file['extension'] == 'js') + + + + @elseif($file['extension'] == 'json') + + + + @elseif($file['extension'] == 'jpg' || $file['extension'] == 'jpeg' || $file['extension'] == 'png' || $file['extension'] == 'gif') + + + + @else + + + + @endif +
+
+ {{ $file['name'] }} + + {{ $file['size'] }} + + {{$file['last_modified']}} + + {{$file['owner']}} / {{$file['group']}} + + {{$file['permission']}} +
-
+