refactor(dev-only): allow sorting files table view by file size

This commit is contained in:
Aman Harwara
2022-12-28 01:14:57 +05:30
parent 2b63484758
commit 8c5944f233
2 changed files with 2 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ export interface SortableItem {
userModifiedDate: Date
title?: string
pinned: boolean
decryptedSize?: number
}
export const CollectionSort: Record<string, keyof SortableItem> = {

View File

@@ -235,6 +235,7 @@ const FilesTableView = ({ application, filesController, featuresController, link
},
{
name: 'Size',
sortBy: 'decryptedSize',
cell: (file) => {
return formatSizeToReadableString(file.decryptedSize)
},