Merge branch 'master' into issue-199

This commit is contained in:
Jori Lallo
2017-09-03 12:17:09 -07:00
committed by GitHub
3 changed files with 11 additions and 6 deletions

View File

@ -69,9 +69,13 @@ type Props = {
}
@keydown('e')
goToEdit() {
if (!this.props.documents.active) return;
this.props.history.push(documentEditUrl(this.props.documents.active));
goToEdit(ev) {
const activeDocument = this.props.documents.active;
if (!activeDocument) return;
ev.preventDefault();
ev.stopPropagation();
this.props.history.push(documentEditUrl(activeDocument));
}
handleLogout = () => {

View File

@ -2,7 +2,6 @@
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
min-height: 43px;
padding: 0 0.5rem;

View File

@ -26,10 +26,9 @@ class SaveAction extends React.Component {
return (
<Link
href
onClick={this.onClick}
style={{ opacity: disabled ? 0.5 : 1 }}
title="Save changes (Cmd+Enter)"
disabled={disabled}
>
{showCheckmark && <SavedIcon />}
{isNew ? 'Publish' : 'Save'}
@ -41,6 +40,9 @@ class SaveAction extends React.Component {
const Link = styled.a`
display: flex;
align-items: center;
opacity: ${props => (props.disabled ? 0.5 : 1)};
pointer-events: ${props => (props.disabled ? 'none' : 'auto')};
cursor: ${props => (props.disabled ? 'default' : 'pointer')};
`;
const SavedIcon = styled(CheckIcon)`