1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-13 23:14:29 +00:00

fix file extended properties path (#6739)

* fix file extended properties path

* delete ueseless codes
This commit is contained in:
Michael An 2024-09-09 16:47:55 +08:00 committed by GitHub
parent 0bd807ecbf
commit b32c4ab215
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 9 deletions

View File

@ -122,6 +122,9 @@ class DirPath extends React.Component {
path = path[path.length - 1] === '/' ? path.slice(0, path.length - 1) : path;
let pathList = path.split('/');
let nodePath = '';
if (pathList.length === 2 && !pathList[0] && pathList[1] === PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES) {
return null;
}
let pathElem = pathList.map((item, index) => {
if (item === '') {
return null;

View File

@ -36,17 +36,11 @@ class DirColumnFile extends React.Component {
}
}
onEditClick = (e) => {
e.preventDefault();
let { path, repoID } = this.props;
let url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(path) + '?mode=edit';
window.open(url);
};
onOpenFile = (e) => {
e.preventDefault();
let { path, repoID } = this.props;
let newUrl = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(path);
let { path, repoID, currentDirent } = this.props;
let { name } = currentDirent || {};
let newUrl = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(path) + '/' + name;
window.open(newUrl, '_blank');
};