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

optimize code

This commit is contained in:
LeoSirius
2019-07-05 11:05:26 +08:00
parent 5209ec4671
commit 70a5f74788
2 changed files with 9 additions and 10 deletions

View File

@@ -61,7 +61,7 @@ class GroupView extends React.Component {
showManageMembersDialog: false,
groupMembers: [],
isShowDetails: false,
showLeaveGroupDialog: false,
isLeaveGroupDialogOpen: false,
};
}
@@ -311,7 +311,7 @@ class GroupView extends React.Component {
toggleLeaveGroupDialog = () => {
this.setState({
showLeaveGroupDialog: !this.state.showLeaveGroupDialog,
isLeaveGroupDialogOpen: !this.state.isLeaveGroupDialogOpen,
showGroupDropdown: false,
});
}
@@ -416,7 +416,7 @@ class GroupView extends React.Component {
)}
</div>
<div className="path-tool">
{ (isShowSettingIcon) &&
{ isShowSettingIcon &&
<React.Fragment>
<a href="#" className="sf2-icon-cog1 action-icon group-top-action-icon" title="Settings" id="settings"
onClick={this.toggleGroupDropdown}></a>
@@ -452,7 +452,7 @@ class GroupView extends React.Component {
{/* gourp owner only can dissmiss group, admin could not quit, department member could not quit */}
{(!this.state.isOwner && !this.state.isStaff && !isDepartmentGroup) &&
<ul className="sf-popover-list">
<li><a href="#" className="sf-popover-item" onClick={this.toggleLeaveGroupDialog} >{gettext('Leave Group')}</a></li>
<li><a href="#" className="sf-popover-item" onClick={this.toggleLeaveGroupDialog}>{gettext('Leave Group')}</a></li>
</ul>
}
</div>
@@ -576,7 +576,7 @@ class GroupView extends React.Component {
isOwner={this.state.isOwner}
/>
}
{this.state.showLeaveGroupDialog &&
{this.state.isLeaveGroupDialogOpen &&
<LeaveGroupDialog
toggleLeaveGroupDialog={this.toggleLeaveGroupDialog}
groupID={this.props.groupID}