1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-24 12:58:34 +00:00

feat(metadata-table): delete/rename folder/file via contextmenu (#6848)

This commit is contained in:
Jerry Ren
2024-09-29 17:52:25 +08:00
committed by GitHub
parent d0a634a26f
commit ac9ea564b8
32 changed files with 738 additions and 346 deletions

View File

@@ -7,7 +7,7 @@ import DetailItem from '../../../components/dirent-detail/detail-item';
import { Utils } from '../../../utils/utils';
import metadataAPI from '../../api';
import Column from '../../model/metadata/column';
import { getCellValueByColumn, getOptionName, getColumnOptionNamesByIds, getColumnOptionNameById } from '../../utils/cell';
import { getCellValueByColumn, getOptionName, getColumnOptionNamesByIds, getColumnOptionNameById, getFileNameFromRecord } from '../../utils/cell';
import { normalizeFields } from './utils';
import { gettext } from '../../../utils/constants';
import { CellType, PREDEFINED_COLUMN_KEYS, PRIVATE_COLUMN_KEY } from '../../constants';
@@ -102,7 +102,7 @@ const MetadataDetails = ({ repoID, filePath, repoInfo, direntType }) => {
if (isLoading) return null;
const { fields, record } = metadata;
if (!record._id) return null;
const fileName = record[PRIVATE_COLUMN_KEY.FILE_NAME];
const fileName = getFileNameFromRecord(record);
const isImage = record && (Utils.imageCheck(fileName) || Utils.videoCheck(fileName));
return (
<>