@php $dirs = collect($entries)->where('type', 'dir')->count(); $files = collect($entries)->where('type', 'file')->count(); // Human-readable byte sizes for the mock listing (real values come from SFTP later). $fmtSize = function (?int $bytes): string { if ($bytes === null) { return '—'; } $units = ['B', 'KB', 'MB', 'GB', 'TB']; $i = 0; $val = (float) $bytes; while ($val >= 1024 && $i < count($units) - 1) { $val /= 1024; $i++; } return ($i === 0 ? (int) $val : number_format($val, 1)).' '.$units[$i]; }; @endphp
{{-- Header --}}

Dateien

Dateien

SFTP verbunden
{{-- Breadcrumb / path --}}
@foreach ($this->crumbs as $crumb) @if (! $loop->first) / @endif {{-- Segments are plain mono spans for now; wire to wire:click="cd(...)" with the SFTP layer. --}} $loop->last, 'text-accent-text hover:text-accent' => ! $loop->last, ])>{{ $crumb['label'] }} @endforeach
{{-- Listing --}} {{-- Column header (desktop only) --}}
@foreach ($entries as $e) @php $isDir = $e['type'] === 'dir'; @endphp
{{-- Name + icon (directories look clickable) --}}
$isDir, 'bg-raised text-ink-3' => ! $isDir, ])> @if ($isDir) {{-- Plain element for now; wire to wire:click="cd(...)" with the SFTP layer. --}} @else

{{ $e['name'] }}

@endif
{{-- Permissions (hidden on mobile; shown inline below name on tablet+) --}} {{-- Size (hidden on mobile) --}} {{-- Modified --}} {{-- Compact meta line for mobile (perms · size · modified) --}}

{{ $e['perms'] }} · {{ $fmtSize($e['size']) }} · {{ $e['modified'] }}

{{-- Row actions --}}
@unless ($isDir) {{-- R5: wire to wire-elements/modal --}} @endunless {{-- R5: wire to wire-elements/modal --}} {{-- R5: destructive → wire-elements/modal confirm + audit --}}
@endforeach