mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 11:51:27 +00:00
feat: wiki shortcut
This commit is contained in:
@@ -29,7 +29,6 @@ class AddWikiPageDialog extends React.Component {
|
||||
|
||||
handleSubmit = () => {
|
||||
if (!this.state.isSubmitBtnActive) return;
|
||||
|
||||
// first param set false to prevent redirect to new page
|
||||
this.props.onAddPage(false, this.state.wikiPageName);
|
||||
this.props.handleClose();
|
||||
|
@@ -8,6 +8,7 @@ import { Utils } from '../../utils/utils';
|
||||
import Account from '../../components/common/account';
|
||||
import WikiTopNav from './top-nav';
|
||||
import { getCurrentPageConfig } from './utils';
|
||||
import WikiExternalOperations from './wiki-external-operations';
|
||||
|
||||
const propTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
@@ -21,6 +22,7 @@ const propTypes = {
|
||||
config: PropTypes.object,
|
||||
currentPageId: PropTypes.string,
|
||||
onUpdatePage: PropTypes.func,
|
||||
onAddWikiPage: PropTypes.func,
|
||||
};
|
||||
|
||||
class MainPanel extends Component {
|
||||
@@ -65,7 +67,7 @@ class MainPanel extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { permission, pathExist, isDataLoading, isViewFile, config } = this.props;
|
||||
const { permission, pathExist, isDataLoading, isViewFile, config, onAddWikiPage } = this.props;
|
||||
const { currentPageConfig = {}, } = this.state;
|
||||
const isViewingFile = pathExist && !isDataLoading && isViewFile;
|
||||
const isReadOnly = !(permission === 'rw');
|
||||
|
Reference in New Issue
Block a user