diff --git a/frontend/src/metadata/components/metadata-details/constants.js b/frontend/src/metadata/components/metadata-details/constants.js index f870bdc8c4..7ab69780e3 100644 --- a/frontend/src/metadata/components/metadata-details/constants.js +++ b/frontend/src/metadata/components/metadata-details/constants.js @@ -26,6 +26,13 @@ export const NOT_DISPLAY_COLUMN_KEYS = [ PRIVATE_COLUMN_KEY.LOCATION_TRANSLATED, ]; +export const FOLDER_NOT_DISPLAY_COLUMN_KEYS = [ + PRIVATE_COLUMN_KEY.LOCATION, + PRIVATE_COLUMN_KEY.TAGS, + PRIVATE_COLUMN_KEY.FILE_DESCRIPTION, + PRIVATE_COLUMN_KEY.CAPTURE_TIME, +]; + export { PRIVATE_COLUMN_KEY, CellType, diff --git a/frontend/src/metadata/components/metadata-details/index.js b/frontend/src/metadata/components/metadata-details/index.js index d6236f011d..3c8744af7a 100644 --- a/frontend/src/metadata/components/metadata-details/index.js +++ b/frontend/src/metadata/components/metadata-details/index.js @@ -11,6 +11,7 @@ import { useMetadataDetails } from '../../hooks'; import { checkIsDir } from '../../utils/row'; import AI from './ai'; import Settings from './settings'; +import { FOLDER_NOT_DISPLAY_COLUMN_KEYS } from './constants'; import './index.css'; @@ -30,6 +31,7 @@ const MetadataDetails = () => { return ( <> {displayColumns.map(field => { + if (isDir && FOLDER_NOT_DISPLAY_COLUMN_KEYS.includes(field.key)) return null; const value = getCellValueByColumn(record, field); if (field.key === PRIVATE_COLUMN_KEY.LOCATION && isImage && value) { return (<Location key={field.key} position={value} record={record} />);