- Installed p7h/nas-file-manager package via private VCS repo - Published config/nas-file-manager.php with super_admin middleware restriction - Added NAS env vars to .env.example - Created admin/nas-storage page with connection info panel and file browser widget - Added NAS Storage link to admin sidebar (super_admin only) - Added SuperAdminController@nasStorage method and admin.nas-storage route - Includes all accumulated branch changes: profile wall, 2FA, audit logs, settings panel, country/phone/timezone components, posts, slideshow, playlist shares, video downloads/shares, comment likes, notifications, social links, and more Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
90 lines
3.4 KiB
PHP
90 lines
3.4 KiB
PHP
@extends('admin.layout')
|
|
|
|
@section('title', 'NAS Storage')
|
|
|
|
@section('extra_styles')
|
|
<style>
|
|
/* Tailwind-like resets needed for the NAS component (light-theme widget) */
|
|
.nas-wrapper * { box-sizing: border-box; }
|
|
/* brand-* color mappings for the NAS file manager component */
|
|
.nas-wrapper .bg-brand-600, .nas-wrapper .bg-brand-700 { background-color: #e61e1e !important; }
|
|
.nas-wrapper .text-brand-600, .nas-wrapper .text-brand-500 { color: #e61e1e !important; }
|
|
.nas-wrapper .ring-brand-500 { --tw-ring-color: #e61e1e !important; }
|
|
.nas-wrapper .hover\:bg-brand-700:hover { background-color: #c91a1a !important; }
|
|
.nas-wrapper .focus\:ring-brand-500:focus { --tw-ring-color: #e61e1e !important; }
|
|
.nas-wrapper .hover\:text-brand-600:hover { color: #e61e1e !important; }
|
|
.nas-wrapper .hover\:bg-brand-50:hover { background-color: rgba(230,30,30,.08) !important; }
|
|
.nas-wrapper .bg-brand-600.text-white { color: #fff !important; }
|
|
</style>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<div class="adm-page-header">
|
|
<h1 class="adm-page-title">
|
|
<i class="bi bi-hdd-network"></i> NAS Storage
|
|
</h1>
|
|
</div>
|
|
|
|
{{-- Connection config summary --}}
|
|
<div class="adm-card" style="margin-bottom:20px;">
|
|
<div class="adm-card-header">
|
|
<span class="adm-card-title"><i class="bi bi-plug"></i> Connection</span>
|
|
<a href="{{ route('admin.settings') }}" class="adm-btn adm-btn-sm">
|
|
<i class="bi bi-gear"></i> Settings
|
|
</a>
|
|
</div>
|
|
<div class="adm-card-body" style="display:flex;gap:32px;flex-wrap:wrap;">
|
|
@php
|
|
$conn = config('nas-file-manager.connection');
|
|
$fields = [
|
|
'Protocol' => strtoupper($conn['protocol'] ?? '—'),
|
|
'Host' => $conn['host'] ?: '—',
|
|
'Port' => $conn['port'] ?: '—',
|
|
'Share' => $conn['smb_share'] ?: '—',
|
|
'Path' => $conn['path'] ?: '—',
|
|
'User' => $conn['username'] ?: '—',
|
|
];
|
|
@endphp
|
|
@foreach($fields as $label => $value)
|
|
<div>
|
|
<div style="font-size:11px;color:var(--text-2);text-transform:uppercase;letter-spacing:.5px;margin-bottom:3px;">{{ $label }}</div>
|
|
<div style="font-size:13px;font-weight:600;font-family:monospace;">{{ $value }}</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
{{-- NAS File Manager component (Alpine.js + Tailwind) --}}
|
|
<div class="nas-wrapper">
|
|
@include('nas-file-manager::file-manager', [
|
|
'nodes' => $nodes,
|
|
'canEdit' => true,
|
|
'title' => 'NAS Storage Browser',
|
|
])
|
|
</div>
|
|
@endsection
|
|
|
|
@section('scripts')
|
|
<script src="https://cdn.jsdelivr.net/npm/@alpinejs/intersect@3.x.x/dist/cdn.min.js" defer></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@3.4.1/base.min.css">
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<script>
|
|
tailwind.config = {
|
|
theme: {
|
|
extend: {
|
|
colors: {
|
|
brand: {
|
|
50: 'rgba(230,30,30,.08)',
|
|
500: '#e61e1e',
|
|
600: '#e61e1e',
|
|
700: '#c91a1a',
|
|
}
|
|
}
|
|
}
|
|
},
|
|
corePlugins: { preflight: false }
|
|
}
|
|
</script>
|
|
@endsection
|