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

Single selector (#5791)

* [single selector] added a new 'single selector' to replace the 'role editor'

* [sys admin - group - member] replaced the old 'role selector' with the new 'single selector'

* [sys admin - orgs] replaced the old 'role selector' with the new 'single selector'

* [sys admin, org admin] replaced different selectors with the new 'single selector' for users & orgs

* [share link perm selector] replaced it with the new 'single selector'
This commit is contained in:
llj
2023-11-24 18:21:46 +08:00
committed by GitHub
parent 663a78061b
commit 29fa239cd0
21 changed files with 569 additions and 395 deletions

View File

@@ -10,6 +10,7 @@ const propTypes = {
toggleDelete: PropTypes.func.isRequired,
toggleRevokeAdmin: PropTypes.func.isRequired,
orgAdminUsers: PropTypes.array.isRequired,
changeStatus: PropTypes.func.isRequired,
initOrgAdmin: PropTypes.func.isRequired
};
@@ -34,6 +35,10 @@ class OrgAdminList extends React.Component {
this.setState({isItemFreezed: false});
};
toggleItemFreezed = (isFreezed) => {
this.setState({ isItemFreezed: isFreezed });
};
render() {
let orgAdminUsers = this.props.orgAdminUsers;
@@ -50,17 +55,19 @@ class OrgAdminList extends React.Component {
</tr>
</thead>
<tbody>
{orgAdminUsers.map(item => {
{orgAdminUsers.map((item, index) => {
return (
<UserItem
key={item.index}
key={index}
user={item}
currentTab="admins"
isItemFreezed={this.state.isItemFreezed}
toggleDelete={this.props.toggleDelete}
toggleRevokeAdmin={this.props.toggleRevokeAdmin}
changeStatus={this.props.changeStatus}
onFreezedItem={this.onFreezedItem}
onUnfreezedItem={this.onUnfreezedItem}
toggleItemFreezed={this.toggleItemFreezed}
/>
);
})}