Merge branch 'master' into dashboard-improves

This commit is contained in:
Tom Moor
2017-09-03 14:23:09 -07:00
committed by GitHub
5 changed files with 21 additions and 12 deletions

View File

@@ -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 {

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)`

View File

@@ -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,