mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
[tags] removed unused code and file
This commit is contained in:
@@ -6,12 +6,10 @@ import ModalPortal from '../modal-portal';
|
||||
import { Modal } from 'reactstrap';
|
||||
import ListTagDialog from '../dialog/list-tag-dialog';
|
||||
import CreateTagDialog from '../dialog/create-tag-dialog';
|
||||
import UpdateTagDialog from '../dialog/update-tag-dialog';
|
||||
import ListTaggedFilesDialog from '../dialog/list-taggedfiles-dialog';
|
||||
|
||||
const propTypes = {
|
||||
repoID: PropTypes.string.isRequired,
|
||||
repoName: PropTypes.string.isRequired,
|
||||
userPerm: PropTypes.string,
|
||||
currentPath: PropTypes.string.isRequired,
|
||||
updateUsedRepoTags: PropTypes.func.isRequired,
|
||||
@@ -26,7 +24,6 @@ class DirTool extends React.Component {
|
||||
isRepoTagDialogShow: false,
|
||||
currentTag: null,
|
||||
isListRepoTagShow: false,
|
||||
isUpdateRepoTagShow: false,
|
||||
isCreateRepoTagShow: false,
|
||||
isListTaggedFileShow: false,
|
||||
};
|
||||
@@ -37,7 +34,6 @@ class DirTool extends React.Component {
|
||||
this.setState({
|
||||
isRepoTagDialogShow: true,
|
||||
isListRepoTagShow: true,
|
||||
isUpdateRepoTagShow: false,
|
||||
isCreateRepoTagShow: false,
|
||||
isListTaggedFileShow: false
|
||||
});
|
||||
@@ -47,7 +43,6 @@ class DirTool extends React.Component {
|
||||
this.setState({
|
||||
isRepoTagDialogShow: false,
|
||||
isListRepoTagShow: false,
|
||||
isUpdateRepoTagShow: false,
|
||||
isCreateRepoTagShow: false,
|
||||
isListTaggedFileShow: false
|
||||
});
|
||||
@@ -60,14 +55,6 @@ class DirTool extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
onUpdateRepoTagToggle = (currentTag) => {
|
||||
this.setState({
|
||||
currentTag: currentTag,
|
||||
isListRepoTagShow: !this.state.isListRepoTagShow,
|
||||
isUpdateRepoTagShow: !this.state.isUpdateRepoTagShow,
|
||||
});
|
||||
}
|
||||
|
||||
onListTaggedFileToggle = (currentTag) => {
|
||||
this.setState({
|
||||
currentTag: currentTag,
|
||||
@@ -82,7 +69,7 @@ class DirTool extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
let { repoID, repoName, userPerm, currentPath } = this.props;
|
||||
let { repoID, userPerm, currentPath } = this.props;
|
||||
let isFile = this.isMarkdownFile(currentPath);
|
||||
let name = Utils.getFileName(currentPath);
|
||||
let trashUrl = siteRoot + 'repo/' + repoID + '/trash/';
|
||||
@@ -122,16 +109,6 @@ class DirTool extends React.Component {
|
||||
toggleCancel={this.onCreateRepoTagToggle}
|
||||
/>
|
||||
)}
|
||||
{this.state.isUpdateRepoTagShow && (
|
||||
<UpdateTagDialog
|
||||
repoID={repoID}
|
||||
currentTag={this.state.currentTag}
|
||||
onClose={this.onCloseRepoTagDialog}
|
||||
toggleCancel={this.onUpdateRepoTagToggle}
|
||||
onDeleteRepoTag={this.props.onDeleteRepoTag}
|
||||
updateUsedRepoTags={this.props.updateUsedRepoTags}
|
||||
/>
|
||||
)}
|
||||
{this.state.isListTaggedFileShow && (
|
||||
<ListTaggedFilesDialog
|
||||
repoID={this.props.repoID}
|
||||
|
Reference in New Issue
Block a user