diff --git a/pages/post/_slug/edit/_id.vue b/pages/post/_slug/edit/_id.vue new file mode 100644 index 000000000..ddf5e084f --- /dev/null +++ b/pages/post/_slug/edit/_id.vue @@ -0,0 +1,65 @@ + + + diff --git a/pages/post/_slug/index.vue b/pages/post/_slug/index.vue index 200a9f472..34bfce077 100644 --- a/pages/post/_slug/index.vue +++ b/pages/post/_slug/index.vue @@ -12,6 +12,7 @@ context="contribution" :item-id="post.id" :name="post.title" + :is-author="isAuthor" /> @@ -154,6 +155,11 @@ export default { title: 'loading' } }, + computed: { + isAuthor() { + return this.$store.getters['auth/user'].id === this.post.author.id + } + }, watch: { Post(post) { this.post = post[0] diff --git a/pages/post/create.vue b/pages/post/create.vue index d0497d174..309a49cab 100644 --- a/pages/post/create.vue +++ b/pages/post/create.vue @@ -1,11 +1,19 @@