- {#if files.length > 0}
-
-
-
-
- {/if}
-
-
- {#if files.length === 0}
-
- {$i18n.t('No files found')}
-
- {/if}
-
- {#each files as file (file.id)}
-
openFileViewer(file)}
- >
-
-
{file.filename}
-
- {formatFileSize(file.meta?.size ?? 0)}
-
-
-
-
-
- {dayjs(file.created_at * 1000)
- .locale($i18n.language)
- .format('MMM D, YYYY')}
-
-
-
-
-
-
-
-
-
- {/each}
-
- {#if !allFilesLoaded}
-
{
- if (!filesLoading) {
- loadMoreFiles();
- }
- }}
- >
-
-
-
{$i18n.t('Loading...')}
-
-
- {/if}
+ {#if files !== null}
+ {#if files.length}
+
+
+ 0 && !allLoadedSelected}
+ disabled={busy}
+ ariaLabel={$i18n.t('Select loaded files')}
+ on:change={() =>
+ toggleSelection(
+ (files ?? []).map((file) => file.id),
+ !allLoadedSelected
+ )}
+ />
+
+
+
{$i18n.t('Size')}
+
+
+ {/if}
+
+ {#if !files.length && !loadError}
+ {$i18n.t('No files found')}
+
{/if}
+ {#each sortedFiles as file (file.id)}
+
+
+ toggleSelection([file.id], !selectedIds.has(file.id))}
+ />
+
+
{formatFileSize(file.meta?.size ?? 0)}
+
{dayjs(file.created_at * 1000)
+ .locale($i18n.language)
+ .format('MMM D, YYYY')}
+
+
+
+
+
+
+
+
+
- {:else}
-
-
+ {/each}
+ {#if loadError}
+
+ {$i18n.t('Could not load files.')}
+
+ {:else if !allFilesLoaded && !busy}
+
loadFiles(true)}
+ >
{/if}
-
+ {:else}
+
+ {/if}
diff --git a/src/lib/i18n/locales/en-US/translation.json b/src/lib/i18n/locales/en-US/translation.json
index f1c4765a33..7b6b7c094b 100644
--- a/src/lib/i18n/locales/en-US/translation.json
+++ b/src/lib/i18n/locales/en-US/translation.json
@@ -4087,5 +4087,23 @@
"YouTube": "",
"YouTube video player": "",
"Zoom in": "",
- "Zoom out": ""
+ "Zoom out": "",
+ "Delete {{count}} files?_one": "Delete {{count}} file?",
+ "Delete {{count}} files?_other": "Delete {{count}} files?",
+ "This cannot be undone. References to these files may stop working.": "This cannot be undone. References to these files may stop working.",
+ "{{count}} selected": "{{count}} selected",
+ "Clear selection": "Clear selection",
+ "Select all matching files": "Select all matching files",
+ "Selecting all matching files...": "Selecting all matching files...",
+ "Could not select all matching files. Your selection has not changed.": "Could not select all matching files. Your selection has not changed.",
+ "Select loaded files": "Select loaded files",
+ "Select {{filename}}": "Select {{filename}}",
+ "Delete {{filename}}": "Delete {{filename}}",
+ "Could not load files.": "Could not load files.",
+ "Processed {{processed}} of {{total}}": "Processed {{processed}} of {{total}}",
+ "Stopping...": "Stopping...",
+ "{{deleted}} deleted, {{failed}} failed, {{remaining}} not processed.": "{{deleted}} deleted, {{failed}} failed, {{remaining}} not processed.",
+ "Selection actions": "Selection actions",
+ "Actions for {{filename}}": "Actions for {{filename}}",
+ "Preparing {{processed}} of {{total}}": "Preparing {{processed}} of {{total}}"
}