aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/bug/SetTitle.js
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-08-15 22:09:17 +0200
committerMichael Muré <batolettre@gmail.com>2018-08-15 22:09:17 +0200
commit17aa40505b58a4a9d679efb8512252397872470c (patch)
tree9d783de22809130675efea74338161bfb9c28a01 /webui/src/bug/SetTitle.js
parenta47409377417538b7be446a6aa33dae8989cfd9a (diff)
downloadgit-bug-17aa40505b58a4a9d679efb8512252397872470c.tar.gz
webui: display title changes in the timeline
Diffstat (limited to 'webui/src/bug/SetTitle.js')
-rw-r--r--webui/src/bug/SetTitle.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/webui/src/bug/SetTitle.js b/webui/src/bug/SetTitle.js
new file mode 100644
index 00000000..b6bb8b70
--- /dev/null
+++ b/webui/src/bug/SetTitle.js
@@ -0,0 +1,43 @@
+import { withStyles } from '@material-ui/core/styles'
+import gql from 'graphql-tag'
+import React from 'react'
+import Author from '../Author'
+import Date from '../Date'
+
+const styles = theme => ({
+ main: {
+ ...theme.typography.body2
+ },
+ bold: {
+ fontWeight: 'bold'
+ }
+})
+
+const SetTitle = ({op, classes}) => {
+ return (
+ <div className={classes.main}>
+ <Author author={op.author} bold />
+ <span> changed the title from </span>
+ <span className={classes.bold}>{op.was}</span>
+ <span> to </span>
+ <span className={classes.bold}>{op.title}</span>
+ <Date date={op.date} />
+ </div>
+ )
+}
+
+SetTitle.fragment = gql`
+ fragment SetTitle on Operation {
+ ... on SetTitleOperation {
+ date
+ author {
+ name
+ email
+ }
+ title
+ was
+ }
+ }
+`
+
+export default withStyles(styles)(SetTitle)