mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
Merge pull request #5855 from haiwen/add-internal-link
add-internal-link
This commit is contained in:
@@ -10,6 +10,7 @@ import { Utils } from '../../utils/utils';
|
||||
const propTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
repoID: PropTypes.string.isRequired,
|
||||
internalLink: PropTypes.string,
|
||||
onInternalLinkDialogToggle: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
@@ -24,6 +25,10 @@ class InternalLinkDialog extends React.Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (this.props.internalLink) {
|
||||
this.setState({smartLink: this.props.internalLink});
|
||||
return;
|
||||
}
|
||||
this.getInternalLink();
|
||||
}
|
||||
|
||||
@@ -51,7 +56,7 @@ class InternalLinkDialog extends React.Component {
|
||||
};
|
||||
|
||||
toggle = () => {
|
||||
this.props.onInternalLinkDialogToggle();
|
||||
this.props.onInternalLinkDialogToggle({internalLink: ''});
|
||||
};
|
||||
|
||||
render() {
|
||||
|
Reference in New Issue
Block a user