From 615e7efd7c13d445a5fd8c48160d9e86439fb74d Mon Sep 17 00:00:00 2001 From: ghassan Date: Wed, 13 May 2026 13:50:41 +0300 Subject: [PATCH] Redesign NAS file manager to match admin dark theme - Published package views to resources/views/vendor/nas-file-manager/ - Rewrote file-manager.blade.php using admin CSS variables (--bg, --bg-card, --border, --text, --brand, etc.) and Bootstrap Icons instead of Tailwind/SVGs - Replaced accordion wrapper with flat tab bar matching .adm-* tab pattern - Dialogs use --bg-card2, --border-light, and .adm-btn classes - Removed Tailwind CDN and brand color overrides from nas-storage.blade.php Co-Authored-By: Claude Sonnet 4.6 --- resources/views/admin/nas-storage.blade.php | 26 +- .../nas-file-manager/file-manager.blade.php | 703 ++++++++++++++++++ 2 files changed, 704 insertions(+), 25 deletions(-) create mode 100644 resources/views/vendor/nas-file-manager/file-manager.blade.php diff --git a/resources/views/admin/nas-storage.blade.php b/resources/views/admin/nas-storage.blade.php index d683cce..18ee93d 100644 --- a/resources/views/admin/nas-storage.blade.php +++ b/resources/views/admin/nas-storage.blade.php @@ -2,12 +2,6 @@ @section('title', 'NAS Storage') -@section('extra_styles') - -@endsection - @section('content')

@@ -15,7 +9,7 @@

-
+
@include('nas-file-manager::file-manager', [ 'nodes' => $nodes, 'canEdit' => true, @@ -26,22 +20,4 @@ @section('scripts') - - @endsection diff --git a/resources/views/vendor/nas-file-manager/file-manager.blade.php b/resources/views/vendor/nas-file-manager/file-manager.blade.php new file mode 100644 index 0000000..aa3991f --- /dev/null +++ b/resources/views/vendor/nas-file-manager/file-manager.blade.php @@ -0,0 +1,703 @@ +@php + $nodes = $nodes ?? config('nas-file-manager.schema', []); + $canEdit = $canEdit ?? (config('nas-file-manager.edit_gate') === null || \Illuminate\Support\Facades\Gate::allows(config('nas-file-manager.edit_gate'))); + $title = $title ?? 'Folder Structure & File Manager'; + + $conn = config('nas-file-manager.connection', []); + $hasConnection = !empty($conn['host']); + $connConfig = [ + 'protocol' => $conn['protocol'] ?? 'sftp', + 'host' => $conn['host'] ?? '', + 'port' => (int) ($conn['port'] ?? 22), + 'username' => $conn['username'] ?? '', + 'path' => $conn['path'] ?? '/media', + 'smb_share' => $conn['smb_share'] ?? '', + 'smb_domain' => $conn['smb_domain'] ?? '', + 'has_password' => !empty($conn['password']), + ]; +@endphp + + + +
+ + {{-- ── Tab bar ── --}} +
+ + + +
+ + {{-- ── SCHEMA TAB ── --}} +
+

+ Paths are relative to the configured base path. + Placeholders in {curly braces} are filled in at runtime. +

+
+ + +
+
+ + {{-- ── BROWSER TAB ── --}} +
+ + {{-- Toast --}} + + + {{-- Breadcrumb --}} +
+ + + +
+ + {{-- Error --}} + + + {{-- File list --}} +
+ + + +
+ + @if($canEdit) +
+ + +
+ @endif + +
+ + {{-- ── CONNECTION TAB ── --}} +
+ + @if(!$hasConnection) +
+ +
+ NAS connection not configured + Fill in the fields below and click Test Connection to verify, then persist the values in your .env file. +
+
+ @endif + + {{-- Status --}} + + + {{-- Protocol --}} +
+ +
+ +
+
+ +
+
+ + + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+ +
+ +
+ + +

Remote directory the file browser starts from.

+
+ + + + +
+ +
+

+ Persist in .env: + NAS_HOST NAS_USERNAME NAS_PASSWORD +

+ +
+ +
+ +
+ +{{-- ── Rename dialog ── --}} +@if($canEdit) +
+
+
Rename
+
+
+ +
+
+ +
+
+ +{{-- ── Delete dialog ── --}} +
+
+
Delete from NAS
+
+ Delete ? This cannot be undone. +
+ +
+
+@endif + +