diff --git a/webui/src/Author.js b/webui/src/Author.js index 7285ed4bd704d1798fd121a3fc34af83210dfa49..7bb1bf3ca7402af163c34d8e7f0021a0549e8ee0 100644 --- a/webui/src/Author.js +++ b/webui/src/Author.js @@ -1,28 +1,25 @@ -import { withStyles } from '@material-ui/core/styles'; import Tooltip from '@material-ui/core/Tooltip/Tooltip'; +import MAvatar from '@material-ui/core/Avatar'; import React from 'react'; -const styles = theme => ({ - author: { - ...theme.typography.body2, - }, - bold: { - fontWeight: 'bold', - }, -}); - -const Author = ({ author, bold, classes }) => { - const klass = bold ? [classes.author, classes.bold] : [classes.author]; - +const Author = ({ author, ...props }) => { if (!author.email) { - return {author.displayName}; + return {author.displayName}; } return ( - {author.displayName} + {author.displayName} ); }; -export default withStyles(styles)(Author); +export const Avatar = ({ author, ...props }) => { + if (author.avatarUrl) { + return ; + } + + return {author.displayName[0]}; +}; + +export default Author; diff --git a/webui/src/bug/Bug.js b/webui/src/bug/Bug.js index 496d0c4f89d5e875a1ae2980be88214676c7c5cb..9b5f84ad19a77fd0d31005dcfc1cdd15fb193e28 100644 --- a/webui/src/bug/Bug.js +++ b/webui/src/bug/Bug.js @@ -9,29 +9,32 @@ import Label from '../Label'; const styles = theme => ({ main: { - maxWidth: 600, + maxWidth: 800, margin: 'auto', marginTop: theme.spacing.unit * 4, }, - header: {}, + header: { + marginLeft: theme.spacing.unit + 40, + }, title: { ...theme.typography.headline, }, id: { ...theme.typography.subheading, - marginLeft: 15, + marginLeft: theme.spacing.unit, }, container: { display: 'flex', - marginBottom: 30, + marginBottom: theme.spacing.unit, }, timeline: { - width: '70%', - marginTop: 20, - marginRight: 20, + flex: 1, + marginTop: theme.spacing.unit * 2, + marginRight: theme.spacing.unit * 2, }, sidebar: { - width: '30%', + marginTop: theme.spacing.unit * 2, + flex: '0 0 200px', }, labelList: { listStyle: 'none', @@ -39,7 +42,8 @@ const styles = theme => ({ margin: 0, }, label: { - margin: '4px 0', + marginTop: theme.spacing.unit, + marginBottom: theme.spacing.unit, '& > *': { display: 'block', }, @@ -54,7 +58,7 @@ const Bug = ({ bug, classes }) => ( - opened this bug + {' opened this bug '} diff --git a/webui/src/bug/LabelChange.js b/webui/src/bug/LabelChange.js index b1bed4a570977a566bba5eeb9c18724b922ded65..6301f35f36a8ed73dab9b1fc2137a57665346889 100644 --- a/webui/src/bug/LabelChange.js +++ b/webui/src/bug/LabelChange.js @@ -8,6 +8,10 @@ import Label from '../Label'; const styles = theme => ({ main: { ...theme.typography.body2, + marginLeft: theme.spacing.unit + 40, + }, + author: { + fontWeight: 'bold', }, }); @@ -15,7 +19,7 @@ const LabelChange = ({ op, classes }) => { const { added, removed } = op; return (
- + {added.length > 0 && added the } {added.map((label, index) => (