diff options
author | Michael Muré <batolettre@gmail.com> | 2018-08-15 21:49:31 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-08-15 21:49:31 +0200 |
commit | cf9e83e74dc5f91b0e13fbdb79848925e68809a3 (patch) | |
tree | e3b832cf0f5f6e4f4756f4e757babda22d9091e0 /webui/src/bug/Message.js | |
parent | 1984d4343db770fc2c8e251a81f1ab997a4c4d5e (diff) | |
download | git-bug-cf9e83e74dc5f91b0e13fbdb79848925e68809a3.tar.gz |
webui: display label changes in the timeline + cleaning evrywhere
Diffstat (limited to 'webui/src/bug/Message.js')
-rw-r--r-- | webui/src/bug/Message.js | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/webui/src/bug/Message.js b/webui/src/bug/Message.js index 04c7dfab..612a9563 100644 --- a/webui/src/bug/Message.js +++ b/webui/src/bug/Message.js @@ -1,9 +1,9 @@ import { withStyles } from '@material-ui/core/styles' -import Tooltip from '@material-ui/core/Tooltip/Tooltip' import Typography from '@material-ui/core/Typography' import gql from 'graphql-tag' -import * as moment from 'moment' import React from 'react' +import Author from '../Author' +import Date from '../Date' const styles = theme => ({ header: { @@ -14,10 +14,6 @@ const styles = theme => ({ borderTopLeftRadius: 3, borderTopRightRadius: 3, }, - author: { - ...theme.typography.body2, - fontWeight: 'bold' - }, message: { borderLeft: '1px solid #d1d5da', borderRight: '1px solid #d1d5da', @@ -25,23 +21,20 @@ const styles = theme => ({ borderBottomLeftRadius: 3, borderBottomRightRadius: 3, backgroundColor: '#fff', - minHeight: 50 + minHeight: 50, + padding: 5, } }) -const Message = ({message, classes}) => ( +const Message = ({op, classes}) => ( <div> <div className={classes.header}> - <Tooltip title={message.author.email}> - <span className={classes.author}>{message.author.name}</span> - </Tooltip> + <Author className={classes.author} author={op.author} bold /> <span> commented </span> - <Tooltip title={moment(message.date).format('MMMM D, YYYY, h:mm a')}> - <span> {moment(message.date).fromNow()} </span> - </Tooltip> + <Date date={op.date} /> </div> <div className={classes.message}> - <Typography>{message.message}</Typography> + <Typography>{op.message}</Typography> </div> </div> ) |