mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 00:00:00 +00:00
fix: metadata system folders (#6588)
Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
@@ -21,6 +21,11 @@ export const NOT_DISPLAY_COLUMN_KEYS = [
|
||||
PRIVATE_COLUMN_KEY.FILE_DETAILS,
|
||||
];
|
||||
|
||||
export const SYSTEM_FOLDERS = [
|
||||
'/_Internal',
|
||||
'/images'
|
||||
];
|
||||
|
||||
export {
|
||||
PRIVATE_COLUMN_KEY,
|
||||
};
|
||||
|
@@ -10,6 +10,7 @@ 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 { SYSTEM_FOLDERS } from './constants';
|
||||
|
||||
import './index.css';
|
||||
|
||||
@@ -20,6 +21,11 @@ const MetadataDetails = ({ repoID, filePath, repoInfo, direntType }) => {
|
||||
|
||||
useEffect(() => {
|
||||
setLoading(true);
|
||||
if (SYSTEM_FOLDERS.find(folderPath => filePath.startsWith(folderPath))) {
|
||||
setLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const dirName = Utils.getDirName(filePath);
|
||||
const fileName = Utils.getFileName(filePath);
|
||||
let parentDir = direntType === 'file' ? dirName : dirName.slice(0, dirName.length - fileName.length - 1);
|
||||
|
Reference in New Issue
Block a user