Merge branch 'master' into issue-199
This commit is contained in:
@ -69,9 +69,13 @@ type Props = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keydown('e')
|
@keydown('e')
|
||||||
goToEdit() {
|
goToEdit(ev) {
|
||||||
if (!this.props.documents.active) return;
|
const activeDocument = this.props.documents.active;
|
||||||
this.props.history.push(documentEditUrl(this.props.documents.active));
|
if (!activeDocument) return;
|
||||||
|
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
this.props.history.push(documentEditUrl(activeDocument));
|
||||||
}
|
}
|
||||||
|
|
||||||
handleLogout = () => {
|
handleLogout = () => {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
|
||||||
min-height: 43px;
|
min-height: 43px;
|
||||||
padding: 0 0.5rem;
|
padding: 0 0.5rem;
|
||||||
|
|
||||||
|
@ -26,10 +26,9 @@ class SaveAction extends React.Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
href
|
|
||||||
onClick={this.onClick}
|
onClick={this.onClick}
|
||||||
style={{ opacity: disabled ? 0.5 : 1 }}
|
|
||||||
title="Save changes (Cmd+Enter)"
|
title="Save changes (Cmd+Enter)"
|
||||||
|
disabled={disabled}
|
||||||
>
|
>
|
||||||
{showCheckmark && <SavedIcon />}
|
{showCheckmark && <SavedIcon />}
|
||||||
{isNew ? 'Publish' : 'Save'}
|
{isNew ? 'Publish' : 'Save'}
|
||||||
@ -41,6 +40,9 @@ class SaveAction extends React.Component {
|
|||||||
const Link = styled.a`
|
const Link = styled.a`
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
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)`
|
const SavedIcon = styled(CheckIcon)`
|
||||||
|
Reference in New Issue
Block a user