Added keyboard shortcut for move
This commit is contained in:
@@ -4,13 +4,13 @@ import get from 'lodash/get';
|
||||
import styled from 'styled-components';
|
||||
import { observable } from 'mobx';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import { withRouter, Prompt, Route } from 'react-router';
|
||||
import { withRouter, Prompt } from 'react-router';
|
||||
import keydown from 'react-keydown';
|
||||
import Flex from 'components/Flex';
|
||||
import { color, layout } from 'styles/constants';
|
||||
import { collectionUrl, updateDocumentUrl } from 'utils/routeHelpers';
|
||||
|
||||
import Document from 'models/Document';
|
||||
import Modal from 'components/Modal';
|
||||
import DocumentMove from './components/DocumentMove';
|
||||
import UiStore from 'stores/UiStore';
|
||||
import DocumentsStore from 'stores/DocumentsStore';
|
||||
@@ -77,6 +77,12 @@ type Props = {
|
||||
this.props.ui.clearActiveDocument();
|
||||
}
|
||||
|
||||
@keydown('m')
|
||||
goToMove(event) {
|
||||
event.preventDefault();
|
||||
this.props.history.push(`${this.document.url}/move`);
|
||||
}
|
||||
|
||||
loadDocument = async props => {
|
||||
if (props.newDocument) {
|
||||
const newDocument = new Document({
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
- `Cmd+Enter` - Save and exit document editor
|
||||
- `Cmd+S` - Save document and continue editing
|
||||
- `Cmd+s` - Save document and continue editing
|
||||
- `Cmd+Esc` - Cancel edit
|
||||
- `/` or `t` - Jump to search
|
||||
- `d` - Jump to dashboard
|
||||
- `c` - Compose within a collection
|
||||
- `e` - Edit document
|
||||
- `m` - Move document
|
||||
- `?` - This guide
|
||||
|
||||
Reference in New Issue
Block a user