summaryrefslogtreecommitdiff
path: root/src/server/web/app/common/views/components/poll.vue
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-29 14:48:47 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-29 14:48:47 +0900
commitbfc193d8cd9aecdb82d585e8b4e101deac60a5bb (patch)
tree8b4dac3a56cf703650c8207f9279028a8560a96b /src/server/web/app/common/views/components/poll.vue
parentresolve conflict (diff)
downloadmisskey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.gz
misskey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.bz2
misskey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.zip
Resolve conflicts
Diffstat (limited to 'src/server/web/app/common/views/components/poll.vue')
-rw-r--r--src/server/web/app/common/views/components/poll.vue10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/web/app/common/views/components/poll.vue b/src/server/web/app/common/views/components/poll.vue
index 8156c8bc58..711d89720e 100644
--- a/src/server/web/app/common/views/components/poll.vue
+++ b/src/server/web/app/common/views/components/poll.vue
@@ -4,7 +4,7 @@
<li v-for="choice in poll.choices" :key="choice.id" @click="vote(choice.id)" :class="{ voted: choice.voted }" :title="!isVoted ? '%i18n:common.tags.mk-poll.vote-to%'.replace('{}', choice.text) : ''">
<div class="backdrop" :style="{ 'width': (showResult ? (choice.votes / total * 100) : 0) + '%' }"></div>
<span>
- <template v-if="choice.is_voted">%fa:check%</template>
+ <template v-if="choice.isVoted">%fa:check%</template>
<span>{{ choice.text }}</span>
<span class="votes" v-if="showResult">({{ '%i18n:common.tags.mk-poll.vote-count%'.replace('{}', choice.votes) }})</span>
</span>
@@ -36,7 +36,7 @@ export default Vue.extend({
return this.poll.choices.reduce((a, b) => a + b.votes, 0);
},
isVoted(): boolean {
- return this.poll.choices.some(c => c.is_voted);
+ return this.poll.choices.some(c => c.isVoted);
}
},
created() {
@@ -47,15 +47,15 @@ export default Vue.extend({
this.showResult = !this.showResult;
},
vote(id) {
- if (this.poll.choices.some(c => c.is_voted)) return;
+ if (this.poll.choices.some(c => c.isVoted)) return;
(this as any).api('posts/polls/vote', {
- post_id: this.post.id,
+ postId: this.post.id,
choice: id
}).then(() => {
this.poll.choices.forEach(c => {
if (c.id == id) {
c.votes++;
- Vue.set(c, 'is_voted', true);
+ Vue.set(c, 'isVoted', true);
}
});
this.showResult = true;