1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 18:29:23 +00:00

Detail panel (#3232)

* update dirent detail btn

* update icon

* add animation

* update
This commit is contained in:
Michael An
2019-04-10 16:04:26 +08:00
committed by Daniel Pan
parent 49199d7990
commit d1f509e8fd
8 changed files with 149 additions and 15 deletions

View File

@@ -83,7 +83,7 @@ class LibContentContainer extends React.Component {
constructor(props) {
super(props);
this.state = {
currentDirent: null,
currentDirent: {},
appMenuType: 'item_op_menu',
};
@@ -286,6 +286,7 @@ class LibContentContainer extends React.Component {
repoID={repoID}
path={this.props.path}
dirent={this.state.currentDirent}
currentRepoInfo={this.props.currentRepoInfo}
onItemDetailsClose={this.onItemDetailsClose}
onFileTagChanged={this.props.onFileTagChanged}
/>

View File

@@ -83,6 +83,10 @@ class LibContentView extends React.Component {
});
}
toggleDirentDetail = () => {
this.setState({ isDirentDetailShow: !this.state.isDirentDetailShow });
}
closeDirentDetail = () => {
this.setState({ isDirentDetailShow: false });
}
@@ -538,6 +542,10 @@ class LibContentView extends React.Component {
if (mode === this.state.currentMode) {
return;
}
if (mode === 'detail') {
this.toggleDirentDetail();
return;
}
cookie.save('seafile-view-mode', mode);
let path = this.state.path;
if (this.state.currentMode === 'column' && this.state.isViewFile) {