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:
@@ -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}
|
||||
/>
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user