mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
add sub-folder permission (#3354)
* add sub-folder permission * [folder permission] fixup
This commit is contained in:
@@ -15,6 +15,7 @@ import LibHistorySettingDialog from '../../components/dialog/lib-history-setting
|
||||
import ChangeRepoPasswordDialog from '../../components/dialog/change-repo-password-dialog';
|
||||
import ResetEncryptedRepoPasswordDialog from '../../components/dialog/reset-encrypted-repo-password-dialog';
|
||||
import LabelRepoStateDialog from '../../components/dialog/label-repo-state-dialog';
|
||||
import LibSubFolderPermissionDialog from '../../components/dialog/lib-sub-folder-permission-dialog';
|
||||
import Rename from '../../components/rename';
|
||||
import MylibRepoMenu from './mylib-repo-menu';
|
||||
|
||||
@@ -43,7 +44,8 @@ class MylibRepoListItem extends React.Component {
|
||||
isHistorySettingDialogShow: false,
|
||||
isChangePasswordDialogShow: false,
|
||||
isResetPasswordDialogShow: false,
|
||||
isLabelRepoStateDialogOpen: false
|
||||
isLabelRepoStateDialogOpen: false,
|
||||
isFolderPermissionDialogShow: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -89,7 +91,7 @@ class MylibRepoListItem extends React.Component {
|
||||
this.onResetPasswordToggle();
|
||||
break;
|
||||
case 'Folder Permission':
|
||||
// todo
|
||||
this.onFolderPermissionToggle();
|
||||
break;
|
||||
case 'Label current state':
|
||||
this.onLabelToggle();
|
||||
@@ -148,6 +150,10 @@ class MylibRepoListItem extends React.Component {
|
||||
this.setState({isLabelRepoStateDialogOpen: !this.state.isLabelRepoStateDialogOpen});
|
||||
}
|
||||
|
||||
onFolderPermissionToggle = () => {
|
||||
this.setState({isFolderPermissionDialogShow: !this.state.isFolderPermissionDialogShow});
|
||||
}
|
||||
|
||||
onUnfreezedItem = () => {
|
||||
this.setState({
|
||||
highlight: false,
|
||||
@@ -354,6 +360,7 @@ class MylibRepoListItem extends React.Component {
|
||||
/>
|
||||
</ModalPortal>
|
||||
)}
|
||||
|
||||
{this.state.isLabelRepoStateDialogOpen && (
|
||||
<ModalPortal>
|
||||
<LabelRepoStateDialog
|
||||
@@ -363,6 +370,16 @@ class MylibRepoListItem extends React.Component {
|
||||
/>
|
||||
</ModalPortal>
|
||||
)}
|
||||
|
||||
{this.state.isFolderPermissionDialogShow && (
|
||||
<ModalPortal>
|
||||
<LibSubFolderPermissionDialog
|
||||
toggleDialog={this.onFolderPermissionToggle}
|
||||
repoID={repo.repo_id}
|
||||
repoName={repo.repo_name}
|
||||
/>
|
||||
</ModalPortal>
|
||||
)}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user