Library Files {book.files.length}
Filename Size File type Actions {#each book.files as file (file.id)} {file.filename} {formatFileSize(file.size)} {getFileType(file.filename)}
{#if getFileType(file.filename) == 'EPUB' || getFileType(file.filename) == 'PDF'} handleRead(file)} >

Read

{/if} handleDownload(file)} >

Download

{ fileToDelete = file.id; }} >

Delete

Are you absolutely sure? This action cannot be undone. This will permanently delete the record from the database and the file from the filesystem. Cancel { handleDeleteFile(fileToDelete); fileDeleteDialogOpen = false; fileToDelete = undefined; }} class="text-destructive-foreground bg-destructive hover:bg-destructive/90" >Delete
{/each}