feat: add selected file size in context menu (#1224)

This commit is contained in:
Aman Harwara
2022-07-07 15:51:16 +05:30
committed by GitHub
parent 6ebac52cb0
commit 50c024e643
2 changed files with 10 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import { useCloseOnBlur } from '@/Hooks/useCloseOnBlur'
import { PopoverFileSubmenuProps } from './PopoverFileItemProps'
import { PopoverFileItemActionType } from './PopoverFileItemAction'
import HorizontalSeparator from '../Shared/HorizontalSeparator'
import { formatSizeToReadableString } from '@standardnotes/filepicker'
const PopoverFileSubmenu: FunctionComponent<PopoverFileSubmenuProps> = ({
file,
@@ -188,9 +189,12 @@ const PopoverFileSubmenu: FunctionComponent<PopoverFileSubmenuProps> = ({
<span className="text-danger">Delete permanently</span>
</button>
<div className="px-3 py-1 text-xs font-medium text-neutral">
<div>
<div className="mb-1">
<span className="font-semibold">File ID:</span> {file.uuid}
</div>
<div>
<span className="font-semibold">Size:</span> {formatSizeToReadableString(file.decryptedSize)}
</div>
</div>
</>
)}