Version History (#768)
* Stash. Super rough progress * Stash * 'h' how toggles history panel Add documents.restore endpoint * Add tests for documents.restore endpoint * Document restore endpoint * Tiding, RevisionMenu, remove scroll dep * Add history menu item * Paginate loading * Fixed: Error boundary styling Select first revision faster * Diff summary, styling * Add history loading placeholder Fix move modal not opening * Fixes: Refreshing page on specific revision * documentation for document.revision * Better handle versions with no text changes (will no longer be created)
This commit is contained in:
@@ -7,7 +7,7 @@ import { MoreIcon } from 'outline-icons';
|
||||
import Document from 'models/Document';
|
||||
import UiStore from 'stores/UiStore';
|
||||
import AuthStore from 'stores/AuthStore';
|
||||
import { documentMoveUrl } from 'utils/routeHelpers';
|
||||
import { documentMoveUrl, documentHistoryUrl } from 'utils/routeHelpers';
|
||||
import { DropdownMenu, DropdownMenuItem } from 'components/DropdownMenu';
|
||||
|
||||
type Props = {
|
||||
@@ -34,6 +34,10 @@ class DocumentMenu extends React.Component<Props> {
|
||||
this.props.ui.setActiveModal('document-delete', { document });
|
||||
};
|
||||
|
||||
handleDocumentHistory = () => {
|
||||
this.props.history.push(documentHistoryUrl(this.props.document));
|
||||
};
|
||||
|
||||
handleMove = (ev: SyntheticEvent<*>) => {
|
||||
this.props.history.push(documentMoveUrl(this.props.document));
|
||||
};
|
||||
@@ -103,6 +107,9 @@ class DocumentMenu extends React.Component<Props> {
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
<hr />
|
||||
<DropdownMenuItem onClick={this.handleDocumentHistory}>
|
||||
Document history
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
onClick={this.handleNewChild}
|
||||
title="Create a new child document for the current document"
|
||||
|
||||
Reference in New Issue
Block a user