File System
uploadInputRef.click()}>
Upload File
New File
New Folder
{#if error}
{error}
{/if} {#if uploadProgress}
Uploading...
{uploadProgress.percentage.toFixed(1)}% ({formatBytes(uploadProgress.bytesTransferred)} / {formatBytes(uploadProgress.totalBytes)})
{/if} {#if downloadProgress}
Downloading...
{downloadProgress.percentage.toFixed(1)}% ({formatBytes(downloadProgress.bytesTransferred)} / {formatBytes(downloadProgress.totalBytes)})
{/if}
{currentPath}
{#if currentPath !== '/'}
↑ Up
{/if}
{#if loading}
{:else} {#each directories as dir (dir.name)}
navigateTo(dir.name)}>
{dir.name}
handleDelete(dir.name, true)} >
{/each} {#each files as file (file.name)}
loadFileContent(file.name)} class:font-bold={selectedFile === file.name} >
{file.name}
{formatBytes(file.size)}
handleDownload(file.name)} title="Download" >
handleDelete(file.name, false)} title="Delete" >
{/each} {#if files.length === 0 && directories.length === 0}
Directory is empty
{/if} {/if}
{#if selectedFile}
{selectedFile}
{#if isEditing}
Save
{ isEditing = false loadFileContent(selectedFile) }}> Cancel
{:else}
(isEditing = true)}> Edit
handleDownload(selectedFile)}>
Download
handleDelete(selectedFile, false)}> Delete
{/if}
{#if fileLoading}
{:else if isEditing}
{:else}
{fileContent}
{/if} {:else}
Select a file to view its contents
{/if}