diff --git a/frontend/components/Editor/Editor.js b/frontend/components/Editor/Editor.js index f863ad2e..ebb89a2c 100644 --- a/frontend/components/Editor/Editor.js +++ b/frontend/components/Editor/Editor.js @@ -98,7 +98,7 @@ export default class MarkdownEditor extends Component { render = () => { return ( - +
- Search + Search
} diff --git a/frontend/components/PublishingInfo/PublishingInfo.js b/frontend/components/PublishingInfo/PublishingInfo.js index ddf87e17..a9f58eee 100644 --- a/frontend/components/PublishingInfo/PublishingInfo.js +++ b/frontend/components/PublishingInfo/PublishingInfo.js @@ -1,36 +1,47 @@ // @flow -import React, { PropTypes } from 'react'; +import React, { Component } from 'react'; import moment from 'moment'; import styled from 'styled-components'; - +import type { User } from 'types'; import { Flex } from 'reflexbox'; -import styles from './PublishingInfo.scss'; +const Container = styled(Flex)` + margin-bottom: 30px; + color: #ccc; + font-size: 13px; +`; -class PublishingInfo extends React.Component { - static propTypes = { - collaborators: PropTypes.array.isRequired, - createdAt: PropTypes.string.isRequired, - createdBy: PropTypes.object.isRequired, - updatedAt: PropTypes.string.isRequired, - updatedBy: PropTypes.object.isRequired, +const Avatars = styled(Flex)` + flex-direction: row-reverse; + margin-right: 10px; +`; + +const Avatar = styled.img` + width: 26px; + height: 26px; + flex-shrink: 0; + border-radius: 50%; + border: 2px solid #FFFFFF; +`; + +class PublishingInfo extends Component { + props: { + collaborators: Array, + createdAt: string, + createdBy: User, + updatedAt: string, + updatedBy: User, }; render() { return ( - - - {this.props.collaborators - .reverse() - .map(user => ( - - ))} - - + + + {this.props.collaborators.map(user => ( + + ))} + + {this.props.createdBy.name} {' '} published @@ -45,18 +56,9 @@ class PublishingInfo extends React.Component { : null} - + ); } } -const Avatar = styled.img` - width: 26px; - height: 26px; - marginRight: '-12px', - - border-radius: 50%; - border: '2px solid #FFFFFF'; -`; - export default PublishingInfo; diff --git a/frontend/components/PublishingInfo/PublishingInfo.scss b/frontend/components/PublishingInfo/PublishingInfo.scss deleted file mode 100644 index d65d7673..00000000 --- a/frontend/components/PublishingInfo/PublishingInfo.scss +++ /dev/null @@ -1,14 +0,0 @@ -.avatarLine { - flex-direction: row-reverse; - margin-right: 10px; -} - -.user { - margin-bottom: 30px; - color: #ccc; - font-size: 13px; -} - -.userName { - margin: 0 0 0 10px; -} diff --git a/frontend/index.js b/frontend/index.js index 1a793b50..425c2b1a 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -54,7 +54,6 @@ const KeyboardShortcuts = () => ( ); const Api = () => ; -const DocumentEdit = () => ; const DocumentNew = () => ; const DocumentNewChild = () => ; @@ -70,7 +69,7 @@ render( - + } {this.store.document && - } + + {!isEditing && + + + } + + } ); } diff --git a/frontend/types/index.js b/frontend/types/index.js index ac157676..9b0ed127 100644 --- a/frontend/types/index.js +++ b/frontend/types/index.js @@ -23,7 +23,7 @@ export type Document = { collaborators: Array, collection: Object, createdAt: string, - createdBy: string, + createdBy: User, html: string, id: string, private: boolean, @@ -31,7 +31,7 @@ export type Document = { text: string, title: string, updatedAt: string, - updatedBy: string, + updatedBy: User, url: string, };