diff options
author | Luke Granger-Brown <git@lukegb.com> | 2020-06-18 02:52:33 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-06-27 22:56:10 +0200 |
commit | 4a28f25347addf05708cdff37ecace4139f01779 (patch) | |
tree | 145e5fd420f70b182d66a5824d76300b5307d509 /webui/src/pages | |
parent | 23228101a2a38a139f6fc2cafc18e9f08d911089 (diff) | |
download | git-bug-4a28f25347addf05708cdff37ecace4139f01779.tar.gz |
Add support for read-only mode for web UI.
Fixes #402.
Diffstat (limited to 'webui/src/pages')
-rw-r--r-- | webui/src/pages/bug/Bug.tsx | 9 | ||||
-rw-r--r-- | webui/src/pages/bug/CommentForm.graphql | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/webui/src/pages/bug/Bug.tsx b/webui/src/pages/bug/Bug.tsx index 1bc128dd..99b9bddd 100644 --- a/webui/src/pages/bug/Bug.tsx +++ b/webui/src/pages/bug/Bug.tsx @@ -6,6 +6,7 @@ import { makeStyles } from '@material-ui/core/styles'; import Author from 'src/components/Author'; import Date from 'src/components/Date'; import Label from 'src/components/Label'; +import ReadonlyHidden from 'src/layout/ReadonlyHidden'; import { BugFragment } from './Bug.generated'; import CommentForm from './CommentForm'; @@ -88,9 +89,11 @@ function Bug({ bug }: Props) { <div className={classes.container}> <div className={classes.timeline}> <TimelineQuery id={bug.id} /> - <div className={classes.commentForm}> - <CommentForm bugId={bug.id} /> - </div> + <ReadonlyHidden> + <div className={classes.commentForm}> + <CommentForm bugId={bug.id} /> + </div> + </ReadonlyHidden> </div> <div className={classes.sidebar}> <span className={classes.sidebarTitle}>Labels</span> diff --git a/webui/src/pages/bug/CommentForm.graphql b/webui/src/pages/bug/CommentForm.graphql index 33d21193..f4b61850 100644 --- a/webui/src/pages/bug/CommentForm.graphql +++ b/webui/src/pages/bug/CommentForm.graphql @@ -1,5 +1,7 @@ mutation AddComment($input: AddCommentInput!) { addComment(input: $input) { - operation { id } + operation { + id + } } } |