99 */
1010
1111import React from 'react'
12- import { isNil , isUndefined } from 'lodash'
12+ import { isNil , isNull , isUndefined } from 'lodash'
1313import { useTranslation } from 'react-i18next'
1414import Link from 'antd/es/typography/Link'
1515import { Modal } from '@Pimcore/components/modal/modal'
@@ -24,6 +24,7 @@ import { useUser } from '@Pimcore/modules/auth/hooks/use-user'
2424import { Flex } from '@Pimcore/components/flex/flex'
2525import { useWidgetManager } from '@Pimcore/modules/widget-manager/hooks/use-widget-manager'
2626import { USERS_WIDGET } from '@Pimcore/modules/user'
27+ import { formatDataUnit } from '@Pimcore/utils/data-unit'
2728
2829export interface ISystemInfoModalProps {
2930 isOpen : boolean
@@ -103,22 +104,37 @@ export const SystemInfoModal = ({ isOpen, onClose, data }: ISystemInfoModalProps
103104 < FormKit formProps = { { initialValues : data } } >
104105 < FormKit . Panel >
105106 { renderInputItem ( { label : 'ID' , name : 'id' } ) }
107+
106108 { renderInputItem ( { label : 'Path' , name : 'fullPath' } ) }
107- { renderInputItem ( { label : 'Type' , name : 'type' } ) }
109+
110+ { renderInputItem ( {
111+ label : 'Type' ,
112+ value : `${ data . type } ${ ! isNull ( data . mimeType ) ? `(MIME: ${ data . mimeType } )` : '' } `
113+ } ) }
114+
115+ { data . fileSize > 0 && renderInputItem ( {
116+ label : 'File Size' ,
117+ value : formatDataUnit ( data . fileSize )
118+ } ) }
119+
108120 { renderInputItem ( {
109121 label : 'Modification Date' ,
110122 value : formatDateTime ( { timestamp : data . modificationDate , dateStyle : 'full' , timeStyle : 'full' } )
111123 } ) }
124+
112125 { renderInputItem ( {
113126 label : 'Creation Date' ,
114127 value : formatDateTime ( { timestamp : data . creationDate , dateStyle : 'full' , timeStyle : 'full' } )
115128 } ) }
129+
116130 < Form . Item label = "User Modification" >
117131 < Text type = "secondary" > { getUserLabel ( data . userModification , 'system' ) } </ Text >
118132 </ Form . Item >
133+
119134 < Form . Item label = "Owner" >
120135 { getUserLabel ( 20 , 'User unknown' ) }
121136 </ Form . Item >
137+
122138 { renderInputItem ( { label : 'Deeplink' , name : 'deeplink' } ) }
123139 </ FormKit . Panel
124140 > </ FormKit >
0 commit comments