mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 15:38:15 +00:00
optimized code style
This commit is contained in:
@@ -8,12 +8,14 @@ import { Utils } from '../../utils/utils';
|
|||||||
import { seafileAPI } from '../../utils/seafile-api.js';
|
import { seafileAPI } from '../../utils/seafile-api.js';
|
||||||
|
|
||||||
class GroupItem extends React.Component {
|
class GroupItem extends React.Component {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
isOperationShow: false
|
isOperationShow: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
onMouseEnter = () => {
|
onMouseEnter = () => {
|
||||||
this.setState({isOperationShow: true});
|
this.setState({isOperationShow: true});
|
||||||
}
|
}
|
||||||
|
@@ -7,12 +7,14 @@ import { Button, Input } from 'reactstrap';
|
|||||||
import { seafileAPI } from '../../utils/seafile-api.js';
|
import { seafileAPI } from '../../utils/seafile-api.js';
|
||||||
|
|
||||||
class UserItem extends React.Component {
|
class UserItem extends React.Component {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
isOperationShow: false
|
isOperationShow: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
onMouseEnter = () => {
|
onMouseEnter = () => {
|
||||||
this.setState({isOperationShow: true});
|
this.setState({isOperationShow: true});
|
||||||
}
|
}
|
||||||
|
@@ -46,14 +46,14 @@ class RepoListItem extends React.Component {
|
|||||||
<span className="icon far fa-folder"></span>
|
<span className="icon far fa-folder"></span>
|
||||||
<span className="name">{this.props.repo.repo_name}</span>
|
<span className="name">{this.props.repo.repo_name}</span>
|
||||||
</span>
|
</span>
|
||||||
{
|
{this.state.isShowChildren && (
|
||||||
<DirentListView
|
<DirentListView
|
||||||
repo={this.props.repo}
|
repo={this.props.repo}
|
||||||
isShowChildren={this.state.isShowChildren}
|
isShowChildren={this.state.isShowChildren}
|
||||||
onDirentItemClick={this.onDirentItemClick}
|
onDirentItemClick={this.onDirentItemClick}
|
||||||
selectedPath={this.props.selectedPath}
|
selectedPath={this.props.selectedPath}
|
||||||
/>
|
/>
|
||||||
}
|
)}
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user