mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 06:34:40 +00:00
Merge pull request #6518 from haiwen/fix-selected-file-metadata
fix: selected file metadata info
This commit is contained in:
@@ -126,7 +126,7 @@ class DirentDetails extends React.Component {
|
||||
repoInfo={this.props.currentRepoInfo}
|
||||
dirent={dirent}
|
||||
direntDetail={direntDetail}
|
||||
path={path}
|
||||
path={this.props.dirent ? path + '/' + dirent.name : path}
|
||||
collaborators={collaborators}
|
||||
collaboratorsCache={collaboratorsCache}
|
||||
updateCollaboratorsCache={this.updateCollaboratorsCache}
|
||||
|
@@ -128,12 +128,14 @@ class LibContentContainer extends React.Component {
|
||||
};
|
||||
|
||||
onDirentClick = (dirent, event) => {
|
||||
this.setState({ currentDirent: dirent });
|
||||
const isActive = dirent.isSelected;
|
||||
this.setState({ currentDirent: isActive ? null : dirent });
|
||||
this.props.onDirentClick(dirent, event);
|
||||
};
|
||||
|
||||
onItemSelected = (dirent) => {
|
||||
this.setState({ currentDirent: dirent });
|
||||
const isActive = dirent.isSelected;
|
||||
this.setState({ currentDirent: isActive ? null : dirent });
|
||||
this.props.onItemSelected(dirent);
|
||||
};
|
||||
|
||||
@@ -167,7 +169,7 @@ class LibContentContainer extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
let { path, repoID, usedRepoTags } = this.props;
|
||||
const { path, repoID, usedRepoTags } = this.props;
|
||||
let isRepoInfoBarShow = false;
|
||||
if (path === '/') {
|
||||
if (usedRepoTags.length !== 0) {
|
||||
|
Reference in New Issue
Block a user