+
{Array.isArray(fileTagList) && fileTagList.length > 0 ? (
) : (
@@ -79,13 +84,15 @@ const FileDetails = React.memo(({ repoID, repoInfo, dirent, path, direntDetail,
>
);
}, (props, nextProps) => {
- const { repoID, repoInfo, dirent, path, direntDetail } = props;
+ const { repoID, repoInfo, dirent, path, direntDetail, repoTags, fileTagList } = props;
const isChanged = (
repoID !== nextProps.repoID ||
path !== nextProps.path ||
!ObjectUtils.isSameObject(repoInfo, nextProps.repoInfo) ||
!ObjectUtils.isSameObject(dirent, nextProps.dirent) ||
- !ObjectUtils.isSameObject(direntDetail, nextProps.direntDetail)
+ !ObjectUtils.isSameObject(direntDetail, nextProps.direntDetail) ||
+ repoTags !== nextProps.repoTags ||
+ fileTagList !== nextProps.fileTagList
);
return !isChanged;
});
diff --git a/frontend/src/components/dirent-detail/dirent-details/index.css b/frontend/src/components/dirent-detail/dirent-details/index.css
index 870913a9e3..9a0e83b5b6 100644
--- a/frontend/src/components/dirent-detail/dirent-details/index.css
+++ b/frontend/src/components/dirent-detail/dirent-details/index.css
@@ -27,3 +27,18 @@
.detail-body .empty-tip-text {
color: #666;
}
+
+.detail-body .sf-metadata-property-detail-tags {
+ padding: 7px 6px;
+ width: 100%;
+ cursor: pointer;
+}
+
+.detail-body .sf-metadata-property-detail-tags .file-tag-list {
+ width: 100%;
+ overflow-x: hidden;
+}
+
+.detail-body .sf-metadata-property-detail-tags.tags-empty {
+ padding: 6.5px 6px;;
+}
diff --git a/frontend/src/metadata/metadata-details/constants.js b/frontend/src/metadata/metadata-details/constants.js
index f2a54057a9..bd77672873 100644
--- a/frontend/src/metadata/metadata-details/constants.js
+++ b/frontend/src/metadata/metadata-details/constants.js
@@ -14,7 +14,6 @@ export const NOT_DISPLAY_COLUMN_KEYS = [
PRIVATE_COLUMN_KEY.FILE_NAME,
PRIVATE_COLUMN_KEY.IS_DIR,
PRIVATE_COLUMN_KEY.FILE_TYPE,
- PRIVATE_COLUMN_KEY.LOCATION,
PRIVATE_COLUMN_KEY.OBJ_ID,
PRIVATE_COLUMN_KEY.SIZE,
PRIVATE_COLUMN_KEY.SUFFIX,
diff --git a/frontend/src/metadata/metadata-details/index.js b/frontend/src/metadata/metadata-details/index.js
index 756a3c4a8b..47e028bacb 100644
--- a/frontend/src/metadata/metadata-details/index.js
+++ b/frontend/src/metadata/metadata-details/index.js
@@ -9,7 +9,7 @@ import toaster from '../../components/toast';
import { gettext } from '../../utils/constants';
import { DetailEditor, CellFormatter } from '../metadata-view';
import { getColumnOriginName } from '../metadata-view/utils/column-utils';
-import { CellType, getColumnOptions, getOptionName, PREDEFINED_COLUMN_KEYS, getColumnOptionNamesByIds } from '../metadata-view/_basic';
+import { CellType, getColumnOptions, getOptionName, PREDEFINED_COLUMN_KEYS, getColumnOptionNamesByIds, PRIVATE_COLUMN_KEY } from '../metadata-view/_basic';
import { SYSTEM_FOLDERS } from './constants';
import './index.css';
@@ -35,7 +35,10 @@ const MetadataDetails = ({ repoID, filePath, repoInfo, direntType }) => {
metadataAPI.getMetadataRecordInfo(repoID, parentDir, fileName).then(res => {
const { results, metadata } = res.data;
const record = Array.isArray(results) && results.length > 0 ? results[0] : {};
- const fields = normalizeFields(metadata).map(field => new Column(field));
+ let fields = normalizeFields(metadata).map(field => new Column(field));
+ if (!Utils.imageCheck(fileName)) {
+ fields = fields.filter(filed => filed.key !== PRIVATE_COLUMN_KEY.LOCATION);
+ }
setMetadata({ record, fields });
setLoading(false);
}).catch(error => {