aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src
diff options
context:
space:
mode:
authorSascha <GlancingMind@outlook.com>2021-03-15 13:15:06 +0100
committerSascha <GlancingMind@outlook.com>2021-03-19 17:49:27 +0100
commit0dcb48d03aae413d77c7321f461502fa54abe05f (patch)
tree7d07153f98d6b4f45ae0a39baf92d6e4593c0afc /webui/src
parente0a7088ba0dca77f616af211a1f9e2158af502c3 (diff)
downloadgit-bug-0dcb48d03aae413d77c7321f461502fa54abe05f.tar.gz
Add EditButton to bug message
Diffstat (limited to 'webui/src')
-rw-r--r--webui/src/pages/bug/Message.tsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/webui/src/pages/bug/Message.tsx b/webui/src/pages/bug/Message.tsx
index faff5356..6b04059f 100644
--- a/webui/src/pages/bug/Message.tsx
+++ b/webui/src/pages/bug/Message.tsx
@@ -1,7 +1,10 @@
import React from 'react';
+import IconButton from '@material-ui/core/IconButton';
import Paper from '@material-ui/core/Paper';
+import Tooltip from '@material-ui/core/Tooltip/Tooltip';
import { makeStyles } from '@material-ui/core/styles';
+import EditIcon from '@material-ui/icons/Edit';
import Author, { Avatar } from 'src/components/Author';
import Content from 'src/components/Content';
@@ -51,6 +54,14 @@ const useStyles = makeStyles((theme) => ({
...theme.typography.body2,
padding: '0.5rem',
},
+ editButton: {
+ color: theme.palette.info.contrastText,
+ padding: '0rem',
+ fontSize: '0.75rem',
+ '&:hover': {
+ backgroundColor: 'inherit',
+ },
+ },
}));
type Props = {
@@ -70,6 +81,15 @@ function Message({ op }: Props) {
<Date date={op.createdAt} />
</div>
{op.edited && <div className={classes.tag}>Edited</div>}
+ <Tooltip title="Edit Message" placement="top" arrow={true}>
+ <IconButton
+ disableRipple
+ className={classes.editButton}
+ aria-label="edit message"
+ >
+ <EditIcon />
+ </IconButton>
+ </Tooltip>
</header>
<section className={classes.body}>
<Content markdown={op.message} />