1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 00:20:07 +00:00

feat: details (#6484)

Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
杨国璇
2024-08-02 22:31:46 +08:00
committed by GitHub
parent 5c2f05ee8d
commit 6ed1fe58bc
33 changed files with 680 additions and 331 deletions

View File

@@ -2,8 +2,7 @@ import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { gettext } from '../../utils/constants';
import CurDirPath from '../../components/cur-dir-path';
import DirentDetail from '../../components/dirent-detail/dirent-details';
import LibDetail from '../../components/dirent-detail/lib-details';
import { LibDetail, DirentDetail } from '../../components/dirent-detail';
import DirColumnView from '../../components/dir-view-mode/dir-column-view';
import ToolbarForSelectedDirents from '../../components/toolbar/selected-dirents-toolbar';
@@ -318,31 +317,29 @@ class LibContentContainer extends React.Component {
isDirentDetailShow={this.props.isDirentDetailShow}
/>
)}
{this.props.isDirentDetailShow && (
<div className="cur-view-detail">
{(this.props.path === '/' && !this.state.currentDirent) ?
<LibDetail
currentRepo={this.props.currentRepoInfo}
closeDetails={this.props.closeDirentDetail}
/> :
<DirentDetail
repoID={repoID}
path={this.props.path}
dirent={this.state.currentDirent}
currentRepoInfo={this.props.currentRepoInfo}
repoTags={this.props.repoTags}
fileTags={this.props.isViewFile ? this.props.fileTags : []}
onFileTagChanged={this.props.onFileTagChanged}
onItemDetailsClose={this.props.closeDirentDetail}
direntDetailPanelTab={this.props.direntDetailPanelTab}
/>
}
</div>
)}
</div>
</div>
{this.props.isDirentDetailShow &&
<Fragment>
<div className="cur-view-detail">
{(this.props.path === '/' && !this.state.currentDirent) ?
<LibDetail
currentRepo={this.props.currentRepoInfo}
closeDetails={this.props.closeDirentDetail}
/> :
<DirentDetail
repoID={repoID}
path={this.props.path}
dirent={this.state.currentDirent}
currentRepoInfo={this.props.currentRepoInfo}
repoTags={this.props.repoTags}
fileTags={this.props.isViewFile ? this.props.fileTags : []}
onFileTagChanged={this.props.onFileTagChanged}
onItemDetailsClose={this.props.closeDirentDetail}
direntDetailPanelTab={this.props.direntDetailPanelTab}
/>
}
</div>
</Fragment>
}
</Fragment>
);
}