• { if (entry.type !== 'directory') return; if (!writable) return; if (!e.dataTransfer?.types.includes('application/x-terminal-file-move')) return; e.preventDefault(); e.stopPropagation(); dragOverFolder = true; if (!expanded && !expandTimer) { expandTimer = setTimeout(() => { onToggleExpand(directoryPath); expandTimer = null; }, 600); } }} on:dragleave={(e) => { if (entry.type !== 'directory') return; e.stopPropagation(); dragOverFolder = false; clearExpandTimer(); }} on:drop={(e) => { if (entry.type !== 'directory') return; if (!writable) return; const raw = e.dataTransfer?.getData('application/x-terminal-file-move'); if (!raw) return; e.preventDefault(); e.stopPropagation(); dragOverFolder = false; clearExpandTimer(); try { const data = JSON.parse(raw); const paths = data.paths || (data.path ? [data.path] : []); const destFolder = directoryPath; for (const p of paths) { if (p + '/' === destFolder || p === destFolder) continue; onMove(p, destFolder); } } catch {} }} > {#if entry.type === 'directory'} {:else} {/if}
    {#if entry.type === 'directory'} {:else} {/if}