Skip to content

Commit

Permalink
Fix eslinting for good
Browse files Browse the repository at this point in the history
Signed-off-by: tiller <no-reply@tiller.fr>
  • Loading branch information
tiller committed Oct 26, 2022
1 parent 6dad1a6 commit fc0e358
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/js/views/Dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
- @copyright Copyright (c) 2022 Michael Longo <contact@tiller.fr>
-
-
- @author Michael Longo <contact@tiller.fr>
-
- @license GNU AGPL version 3 or any later version
Expand All @@ -20,7 +20,7 @@
-
-->

<template>
<template>
<div>
<NcDashboardWidget :items="relevantPolls"
empty-content-icon="icon-polls"
Expand Down Expand Up @@ -54,8 +54,8 @@
</template>

<script>
import PlusIcon from 'vue-material-design-icons/Plus.vue'
import { NcButton, NcDashboardWidget } from '@nextcloud/vue'
import { NcDashboardWidget } from '@nextcloud/vue'
import { showError } from '@nextcloud/dialogs'
import TextPollIcon from 'vue-material-design-icons/FormatListBulletedSquare.vue'
import DatePollIcon from 'vue-material-design-icons/CalendarBlank.vue'
import { mapGetters } from 'vuex'
Expand All @@ -67,9 +67,6 @@ export default {
NcDashboardWidget,
TextPollIcon,
DatePollIcon,
NcButton,
PlusIcon,
PollItem: () => import('../components/PollList/PollItem.vue'),
},
data() {
return {
Expand All @@ -78,24 +75,25 @@ export default {
},
computed: {
...mapGetters({
filteredPolls: 'polls/filtered',
}),
filteredPolls: 'polls/filtered',
}),
relevantPolls() {
const list = [
...this.filteredPolls('relevant'),
]
return list.slice(0, 6)
},
pollLink() {
return (card) => {
return generateUrl(`/apps/polls/vote/${card.id}`)
}
return (card) => generateUrl(`/apps/polls/vote/${card.id}`)
},
},
beforeMount() {
this.loading = true
this.$store.dispatch('polls/list').then(() => {
this.loading = false
return null
}).catch(() => {
showError(t('polls', 'Error loading poll list'))
})
},
}
Expand Down

0 comments on commit fc0e358

Please sign in to comment.