diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 603de348..92dabc91 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -194,11 +194,13 @@ const getNodeInfo = async ({ store }) => { if (res.ok) { const data = await res.json() const metadata = data.metadata + store.dispatch('setInstanceOption', { name: 'pollLimits', value: metadata.pollLimits }) const features = metadata.features store.dispatch('setInstanceOption', { name: 'mediaProxyAvailable', value: features.includes('media_proxy') }) store.dispatch('setInstanceOption', { name: 'chatAvailable', value: features.includes('chat') }) store.dispatch('setInstanceOption', { name: 'gopherAvailable', value: features.includes('gopher') }) + store.dispatch('setInstanceOption', { name: 'pollsAvailable', value: features.includes('polls') }) store.dispatch('setInstanceOption', { name: 'restrictedNicknames', value: metadata.restrictedNicknames }) store.dispatch('setInstanceOption', { name: 'postFormats', value: metadata.postFormats }) diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue index 7ed4821c..01c311d4 100644 --- a/src/components/poll/poll.vue +++ b/src/components/poll/poll.vue @@ -22,7 +22,7 @@ export default { }, computed: { currentUserHasVoted () { - return this.poll.user_voted + return this.poll.voted } }, methods: { diff --git a/src/components/poll/poll_form/poll_form.vue b/src/components/poll/poll_form/poll_form.vue index 7cb5c949..4f8b0070 100644 --- a/src/components/poll/poll_form/poll_form.vue +++ b/src/components/poll/poll_form/poll_form.vue @@ -1,16 +1,16 @@