aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/CommentVoter.vue
diff options
context:
space:
mode:
authorArne Schauf <git@asw.io>2018-03-04 03:38:27 +0100
committerArne Schauf <git@asw.io>2018-03-04 03:38:27 +0100
commit7ecc0e2cdb99fc70a4198c323ee555ae5801a0cf (patch)
tree3215d76bc42794cd877c3b19c61e8db0c34d4c3e /src/components/CommentVoter.vue
parentdf5a54c7b1f862c3425d7aa30e0a8b964e7b9716 (diff)
downloadparry-ui-7ecc0e2cdb99fc70a4198c323ee555ae5801a0cf.tar.gz
parry-ui-7ecc0e2cdb99fc70a4198c323ee555ae5801a0cf.zip
fix voting stuff
Diffstat (limited to 'src/components/CommentVoter.vue')
-rw-r--r--src/components/CommentVoter.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/CommentVoter.vue b/src/components/CommentVoter.vue
index 6f2ce0d..9ab9e72 100644
--- a/src/components/CommentVoter.vue
+++ b/src/components/CommentVoter.vue
@@ -7,9 +7,9 @@
</i>
{{ comment.voting.sum }}
</span>
- <span v-if="comment.author.username !== $store.state.user.decodedToken.username && !myVote">
- <q-btn color="negative" round small icon="fa-thumbs-down" @click="vote(-1)"></q-btn>
- <q-btn color="positive" round small icon="fa-thumbs-up" @click="vote(1)"></q-btn>
+ <span v-if="!myVote">
+ <q-btn color="negative" round size="sm" flat icon="fa-thumbs-down" @click="vote(-1)"></q-btn>
+ <q-btn color="positive" round size="sm" flat icon="fa-thumbs-up" @click="vote(1)"></q-btn>
</span>
<span v-if="myVote">You voted <i :class="`fas fa-thumbs-${myVote.impact === 1 ? 'up text-positive' : 'down text-negative'}`"></i></span>
</div>
@@ -49,7 +49,7 @@
methods: {
vote (impact) {
let that = this
- this.$http.post(`/comments/${this.comment.upload}/comments/${this.comment._id}/vote`, {impact: impact}).then(response => that.$emit('voted'))
+ this.$http.post(`/uploads/${this.comment.upload}/comments/${this.comment._id}/vote`, {impact: impact}).then(response => that.$emit('voted'))
},
},
}