mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
[dir view] grid mode: added 'folder perm'
This commit is contained in:
@@ -18,6 +18,7 @@ import ZipDownloadDialog from '../dialog/zip-download-dialog';
|
|||||||
import Rename from '../../components/dialog/rename-grid-item-dialog';
|
import Rename from '../../components/dialog/rename-grid-item-dialog';
|
||||||
import CreateFile from '../dialog/create-file-dialog';
|
import CreateFile from '../dialog/create-file-dialog';
|
||||||
import CreateFolder from '../dialog/create-folder-dialog';
|
import CreateFolder from '../dialog/create-folder-dialog';
|
||||||
|
import LibSubFolderPermissionDialog from '../dialog/lib-sub-folder-permission-dialog';
|
||||||
|
|
||||||
import '../../css/grid-view.css';
|
import '../../css/grid-view.css';
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ const propTypes = {
|
|||||||
class DirentGridView extends React.Component{
|
class DirentGridView extends React.Component{
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state={
|
this.state= {
|
||||||
isImagePopupOpen: false,
|
isImagePopupOpen: false,
|
||||||
imageItems: [],
|
imageItems: [],
|
||||||
imageIndex: 0,
|
imageIndex: 0,
|
||||||
@@ -59,6 +60,7 @@ class DirentGridView extends React.Component{
|
|||||||
isRenameDialogShow: false,
|
isRenameDialogShow: false,
|
||||||
isCreateFolderDialogShow: false,
|
isCreateFolderDialogShow: false,
|
||||||
isCreateFileDialogShow: false,
|
isCreateFileDialogShow: false,
|
||||||
|
isPermissionDialogOpen: false,
|
||||||
|
|
||||||
isMutipleOperation: false,
|
isMutipleOperation: false,
|
||||||
isGridItemFreezed: false,
|
isGridItemFreezed: false,
|
||||||
@@ -210,7 +212,7 @@ class DirentGridView extends React.Component{
|
|||||||
}
|
}
|
||||||
|
|
||||||
onPermissionItem = () => {
|
onPermissionItem = () => {
|
||||||
|
this.setState({isPermissionDialogOpen: !this.state.isPermissionDialogOpen});
|
||||||
}
|
}
|
||||||
|
|
||||||
onLockItem = (currentObject) => {
|
onLockItem = (currentObject) => {
|
||||||
@@ -613,6 +615,17 @@ class DirentGridView extends React.Component{
|
|||||||
/>
|
/>
|
||||||
</ModalPortal>
|
</ModalPortal>
|
||||||
)}
|
)}
|
||||||
|
{this.state.isPermissionDialogOpen &&
|
||||||
|
<ModalPortal>
|
||||||
|
<LibSubFolderPermissionDialog
|
||||||
|
toggleDialog={this.onPermissionItem}
|
||||||
|
repoID={this.props.repoID}
|
||||||
|
folderPath={direntPath}
|
||||||
|
folderName={dirent.name}
|
||||||
|
isDepartmentRepo={this.props.isGroupOwnedRepo}
|
||||||
|
/>
|
||||||
|
</ModalPortal>
|
||||||
|
}
|
||||||
{this.state.isImagePopupOpen && (
|
{this.state.isImagePopupOpen && (
|
||||||
<ModalPortal>
|
<ModalPortal>
|
||||||
<ImageDialog
|
<ImageDialog
|
||||||
@@ -631,4 +644,4 @@ class DirentGridView extends React.Component{
|
|||||||
|
|
||||||
DirentGridView.propTypes = propTypes;
|
DirentGridView.propTypes = propTypes;
|
||||||
|
|
||||||
export default DirentGridView;
|
export default DirentGridView;
|
||||||
|
Reference in New Issue
Block a user