diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 40cc766d0..a6ceae9c9 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -106,7 +106,8 @@ }, "takeAction": { "name": "Take action" - } + }, + "submitComment": "Submit Comment" }, "quotes": { "african": { diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue index b72faa850..8af07bc26 100644 --- a/webapp/pages/post/_id/_slug/index.vue +++ b/webapp/pages/post/_id/_slug/index.vue @@ -96,34 +96,67 @@ -

- - - {{ post.commentsCount }}  Comments - -

- -
- + +

+ + + {{ post.commentsCount }}  Comments + +

+
+ + + + + + + + {{ $t('actions.cancel') }} + + + + + {{ $t('post.submitComment') }} + + + + + +
+ +
+ -
- +
@@ -139,6 +172,7 @@ import HcUser from '~/components/User' import HcShoutButton from '~/components/ShoutButton.vue' import HcEmpty from '~/components/Empty.vue' import Comment from '~/components/Comment.vue' +import HcEditor from '~/components/Editor/Editor.vue' export default { transition: { @@ -152,7 +186,8 @@ export default { HcShoutButton, HcEmpty, Comment, - ContentMenu + ContentMenu, + HcEditor }, head() { return { @@ -278,6 +313,20 @@ export default { methods: { isAuthor(id) { return this.$store.getters['auth/user'].id === id + }, + handleSubmit() { + this.$apollo.mutate({ + mutation: gql` + mutation($content: String!) { + CreateComment(content: $content) { + content + } + } + `, + variables: { + content: this.value + } + }) } } }