diff --git a/frontend/components/DocumentPreview/DocumentPreview.js b/frontend/components/DocumentPreview/DocumentPreview.js
index 30cc0f845..6703e896f 100644
--- a/frontend/components/DocumentPreview/DocumentPreview.js
+++ b/frontend/components/DocumentPreview/DocumentPreview.js
@@ -19,13 +19,9 @@ const StyledStar = styled(StarIcon)`
top: 2px;
position: relative;
margin-left: 4px;
- opacity: ${props => (props.solid ? 1 : 0.25)};
+ opacity: ${props => (props.solid ? '1 !important' : 0)};
transition: opacity 100ms ease-in-out;
- &:hover {
- opacity: 1;
- }
-
svg {
width: 1em;
height: 1em;
@@ -48,6 +44,14 @@ const DocumentLink = styled(Link)`
background: ${color.smokeLight};
border: 2px solid ${color.smoke};
outline: none;
+
+ ${StyledStar} {
+ opacity: .25;
+
+ &:hover {
+ opacity: 1;
+ }
+ }
}
&:focus {
diff --git a/frontend/components/Layout/Layout.js b/frontend/components/Layout/Layout.js
index b22c3eaeb..9679eb833 100644
--- a/frontend/components/Layout/Layout.js
+++ b/frontend/components/Layout/Layout.js
@@ -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 = () => {
diff --git a/frontend/components/Layout/components/HeaderAction/HeaderAction.scss b/frontend/components/Layout/components/HeaderAction/HeaderAction.scss
index 5e7bbec4c..cc5013907 100644
--- a/frontend/components/Layout/components/HeaderAction/HeaderAction.scss
+++ b/frontend/components/Layout/components/HeaderAction/HeaderAction.scss
@@ -2,7 +2,6 @@
display: flex;
justify-content: center;
align-items: center;
- cursor: pointer;
min-height: 43px;
padding: 0 0.5rem;
diff --git a/frontend/components/Layout/components/SaveAction/SaveAction.js b/frontend/components/Layout/components/SaveAction/SaveAction.js
index ff307acb9..f33cfec42 100644
--- a/frontend/components/Layout/components/SaveAction/SaveAction.js
+++ b/frontend/components/Layout/components/SaveAction/SaveAction.js
@@ -26,10 +26,9 @@ class SaveAction extends React.Component {
return (
{showCheckmark && }
{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)`
diff --git a/server/presenters/document.js b/server/presenters/document.js
index 4dce75bb3..0ca0ea186 100644
--- a/server/presenters/document.js
+++ b/server/presenters/document.js
@@ -31,7 +31,7 @@ async function present(ctx: Object, document: Document, options: ?Options) {
lastViewedAt: undefined,
team: document.teamId,
collaborators: [],
- starred: !!document.starred,
+ starred: !!(document.starred && document.starred.length),
collaboratorCount: undefined,
collection: undefined,
views: undefined,