diff options
author | dartcafe <github@dartcafe.de> | 2021-04-18 23:59:52 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-04-18 23:59:52 +0300 |
commit | 43e516fd48128c94b045c83674fe5970e61cee2d (patch) | |
tree | 79b00434d26a6ed2157f04932e8052873b4b3728 /src | |
parent | 5ada3eaef1c0eda81d94a3fe26826313241d929d (diff) |
arrow-parens
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src')
60 files changed, 124 insertions, 124 deletions
diff --git a/src/js/App.vue b/src/js/App.vue index 25a9b769..f9ede08b 100644 --- a/src/js/App.vue +++ b/src/js/App.vue @@ -76,9 +76,9 @@ export default { computed: { ...mapState({ - settings: state => state.settings.user, - poll: state => state.poll, - acl: state => state.poll.acl, + settings: (state) => state.settings.user, + poll: (state) => state.poll, + acl: (state) => state.poll.acl, }), appStyle() { if (this.settings.useImage && this.settings.experimental) { @@ -196,7 +196,7 @@ export default { 'subscription/get', ) - const requests = dispatches.map(dispatches => this.$store.dispatch(dispatches)) + const requests = dispatches.map((dispatches) => this.$store.dispatch(dispatches)) await Promise.all(requests) } catch { @@ -220,7 +220,7 @@ export default { } try { - const requests = dispatches.map(dispatches => this.$store.dispatch(dispatches)) + const requests = dispatches.map((dispatches) => this.$store.dispatch(dispatches)) await Promise.all(requests) } catch { showError(t('polls', 'Error loading poll list')) diff --git a/src/js/components/Actions/ActionChangeView.vue b/src/js/components/Actions/ActionChangeView.vue index b955b407..26a494a4 100644 --- a/src/js/components/Actions/ActionChangeView.vue +++ b/src/js/components/Actions/ActionChangeView.vue @@ -59,7 +59,7 @@ export default { computed: { ...mapState({ - pollType: state => state.poll.type, + pollType: (state) => state.poll.type, }), ...mapGetters({ diff --git a/src/js/components/Actions/ActionSortOptions.vue b/src/js/components/Actions/ActionSortOptions.vue index 248b8331..00de4d9c 100644 --- a/src/js/components/Actions/ActionSortOptions.vue +++ b/src/js/components/Actions/ActionSortOptions.vue @@ -57,8 +57,8 @@ export default { computed: { ...mapState({ - isRanked: state => state.options.ranked, - pollType: state => state.poll.type, + isRanked: (state) => state.options.ranked, + pollType: (state) => state.poll.type, }), caption() { diff --git a/src/js/components/Actions/ActionSubscribe.vue b/src/js/components/Actions/ActionSubscribe.vue index a1d2258d..83f5a099 100644 --- a/src/js/components/Actions/ActionSubscribe.vue +++ b/src/js/components/Actions/ActionSubscribe.vue @@ -58,7 +58,7 @@ export default { computed: { ...mapState({ - subscribed: state => state.subscription.subscribed, + subscribed: (state) => state.subscription.subscribed, }), caption() { diff --git a/src/js/components/Calendar/CalendarPeek.vue b/src/js/components/Calendar/CalendarPeek.vue index 4f2d3af9..9cb0ebc8 100644 --- a/src/js/components/Calendar/CalendarPeek.vue +++ b/src/js/components/Calendar/CalendarPeek.vue @@ -83,7 +83,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), sortedEvents() { diff --git a/src/js/components/Comments/CommentAdd.vue b/src/js/components/Comments/CommentAdd.vue index d63afc41..e052634a 100644 --- a/src/js/components/Comments/CommentAdd.vue +++ b/src/js/components/Comments/CommentAdd.vue @@ -48,7 +48,7 @@ export default { computed: { ...mapState({ - acl: state => state.poll.acl, + acl: (state) => state.poll.acl, }), }, diff --git a/src/js/components/Comments/CommentItem.vue b/src/js/components/Comments/CommentItem.vue index a3b34fdc..7c3122f2 100644 --- a/src/js/components/Comments/CommentItem.vue +++ b/src/js/components/Comments/CommentItem.vue @@ -73,7 +73,7 @@ export default { computed: { ...mapState({ - acl: state => state.poll.acl, + acl: (state) => state.poll.acl, }), dateCommentedRelative() { return moment.utc(this.comment.dt).fromNow() diff --git a/src/js/components/Comments/Comments.vue b/src/js/components/Comments/Comments.vue index 9f1530ea..51695a13 100644 --- a/src/js/components/Comments/Comments.vue +++ b/src/js/components/Comments/Comments.vue @@ -47,7 +47,7 @@ export default { computed: { ...mapState({ - comments: state => state.comments.list, + comments: (state) => state.comments.list, }), sortedList() { diff --git a/src/js/components/Configuration/ConfigAccess.vue b/src/js/components/Configuration/ConfigAccess.vue index a996f832..5b10bc10 100644 --- a/src/js/components/Configuration/ConfigAccess.vue +++ b/src/js/components/Configuration/ConfigAccess.vue @@ -52,7 +52,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), pollAccess: { diff --git a/src/js/components/Configuration/ConfigAdminAccess.vue b/src/js/components/Configuration/ConfigAdminAccess.vue index 5021e988..1104a694 100644 --- a/src/js/components/Configuration/ConfigAdminAccess.vue +++ b/src/js/components/Configuration/ConfigAdminAccess.vue @@ -37,7 +37,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), adminAccess: { diff --git a/src/js/components/Configuration/ConfigAllowComment.vue b/src/js/components/Configuration/ConfigAllowComment.vue index 54447368..448c8385 100644 --- a/src/js/components/Configuration/ConfigAllowComment.vue +++ b/src/js/components/Configuration/ConfigAllowComment.vue @@ -37,7 +37,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), allowComment: { diff --git a/src/js/components/Configuration/ConfigAllowMayBe.vue b/src/js/components/Configuration/ConfigAllowMayBe.vue index 3f1c0be6..b4930968 100644 --- a/src/js/components/Configuration/ConfigAllowMayBe.vue +++ b/src/js/components/Configuration/ConfigAllowMayBe.vue @@ -43,7 +43,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), allowMaybe: { diff --git a/src/js/components/Configuration/ConfigAnonymous.vue b/src/js/components/Configuration/ConfigAnonymous.vue index d19e90ce..dfef04b3 100644 --- a/src/js/components/Configuration/ConfigAnonymous.vue +++ b/src/js/components/Configuration/ConfigAnonymous.vue @@ -37,7 +37,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), anonymous: { diff --git a/src/js/components/Configuration/ConfigClosing.vue b/src/js/components/Configuration/ConfigClosing.vue index d9536864..1c917dc8 100644 --- a/src/js/components/Configuration/ConfigClosing.vue +++ b/src/js/components/Configuration/ConfigClosing.vue @@ -69,7 +69,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), ...mapGetters({ diff --git a/src/js/components/Configuration/ConfigDescription.vue b/src/js/components/Configuration/ConfigDescription.vue index 92bcd898..efe8bdc6 100644 --- a/src/js/components/Configuration/ConfigDescription.vue +++ b/src/js/components/Configuration/ConfigDescription.vue @@ -33,7 +33,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), description: { diff --git a/src/js/components/Configuration/ConfigOptionLimit.vue b/src/js/components/Configuration/ConfigOptionLimit.vue index 294fa76f..a5d12db1 100644 --- a/src/js/components/Configuration/ConfigOptionLimit.vue +++ b/src/js/components/Configuration/ConfigOptionLimit.vue @@ -49,7 +49,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), useOptionLimit: { diff --git a/src/js/components/Configuration/ConfigProposals.vue b/src/js/components/Configuration/ConfigProposals.vue index cb971338..284ba1ee 100644 --- a/src/js/components/Configuration/ConfigProposals.vue +++ b/src/js/components/Configuration/ConfigProposals.vue @@ -55,7 +55,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), ...mapGetters({ diff --git a/src/js/components/Configuration/ConfigShowResults.vue b/src/js/components/Configuration/ConfigShowResults.vue index f836bb5b..2a884d83 100644 --- a/src/js/components/Configuration/ConfigShowResults.vue +++ b/src/js/components/Configuration/ConfigShowResults.vue @@ -49,7 +49,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), pollShowResults: { diff --git a/src/js/components/Configuration/ConfigTitle.vue b/src/js/components/Configuration/ConfigTitle.vue index b94e6533..9db7a963 100644 --- a/src/js/components/Configuration/ConfigTitle.vue +++ b/src/js/components/Configuration/ConfigTitle.vue @@ -34,7 +34,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), title: { diff --git a/src/js/components/Configuration/ConfigVoteLimit.vue b/src/js/components/Configuration/ConfigVoteLimit.vue index 400f7484..8939b051 100644 --- a/src/js/components/Configuration/ConfigVoteLimit.vue +++ b/src/js/components/Configuration/ConfigVoteLimit.vue @@ -45,8 +45,8 @@ export default { computed: { ...mapState({ - poll: state => state.poll, - countOptions: state => state.options.list.length, + poll: (state) => state.poll, + countOptions: (state) => state.options.list.length, }), useVoteLimit: { diff --git a/src/js/components/Create/CreateDlg.vue b/src/js/components/Create/CreateDlg.vue index 06f4f94d..ab2c69d7 100644 --- a/src/js/components/Create/CreateDlg.vue +++ b/src/js/components/Create/CreateDlg.vue @@ -75,7 +75,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), titleEmpty() { diff --git a/src/js/components/Navigation/Navigation.vue b/src/js/components/Navigation/Navigation.vue index 53d72467..cb9f88df 100644 --- a/src/js/components/Navigation/Navigation.vue +++ b/src/js/components/Navigation/Navigation.vue @@ -77,7 +77,7 @@ export default { computed: { ...mapState({ - pollCategories: state => state.polls.categories, + pollCategories: (state) => state.polls.categories, }), ...mapGetters({ diff --git a/src/js/components/Options/Confirmation.vue b/src/js/components/Options/Confirmation.vue index 5ad27f87..8adcb8a7 100644 --- a/src/js/components/Options/Confirmation.vue +++ b/src/js/components/Options/Confirmation.vue @@ -43,8 +43,8 @@ export default { computed: { ...mapState({ - poll: state => state.poll, - votes: state => state.votes.list, + poll: (state) => state.poll, + votes: (state) => state.votes.list, }), ...mapGetters({ diff --git a/src/js/components/Options/OptionItem.vue b/src/js/components/Options/OptionItem.vue index 60c9552c..260bbda9 100644 --- a/src/js/components/Options/OptionItem.vue +++ b/src/js/components/Options/OptionItem.vue @@ -99,7 +99,7 @@ export default { }, computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), isDraggable() { diff --git a/src/js/components/Options/OptionItemOwner.vue b/src/js/components/Options/OptionItemOwner.vue index 50430150..cb9527a8 100644 --- a/src/js/components/Options/OptionItemOwner.vue +++ b/src/js/components/Options/OptionItemOwner.vue @@ -68,8 +68,8 @@ export default { computed: { ...mapState({ - pollOwner: state => state.poll.owner, - acl: state => state.poll.acl, + pollOwner: (state) => state.poll.owner, + acl: (state) => state.poll.acl, }), ...mapGetters({ diff --git a/src/js/components/Options/OptionProposals.vue b/src/js/components/Options/OptionProposals.vue index b07cdb04..d329b141 100644 --- a/src/js/components/Options/OptionProposals.vue +++ b/src/js/components/Options/OptionProposals.vue @@ -55,7 +55,7 @@ export default { computed: { ...mapState({ - pollType: state => state.poll.type, + pollType: (state) => state.poll.type, }), ...mapGetters({ diff --git a/src/js/components/Options/OptionsDate.vue b/src/js/components/Options/OptionsDate.vue index dee5f236..07d5dc42 100644 --- a/src/js/components/Options/OptionsDate.vue +++ b/src/js/components/Options/OptionsDate.vue @@ -107,8 +107,8 @@ export default { computed: { ...mapState({ - options: state => state.options.list, - acl: state => state.poll.acl, + options: (state) => state.options.list, + acl: (state) => state.poll.acl, }), ...mapGetters({ diff --git a/src/js/components/Options/OptionsDateShift.vue b/src/js/components/Options/OptionsDateShift.vue index e5093858..72abc40c 100644 --- a/src/js/components/Options/OptionsDateShift.vue +++ b/src/js/components/Options/OptionsDateShift.vue @@ -75,7 +75,7 @@ export default { computed: { ...mapState({ - options: state => state.options.list, + options: (state) => state.options.list, }), ...mapGetters({ diff --git a/src/js/components/Options/OptionsText.vue b/src/js/components/Options/OptionsText.vue index 018a6106..7d916022 100644 --- a/src/js/components/Options/OptionsText.vue +++ b/src/js/components/Options/OptionsText.vue @@ -88,8 +88,8 @@ export default { computed: { ...mapState({ - options: state => state.options.list, - acl: state => state.poll.acl, + options: (state) => state.options.list, + acl: (state) => state.poll.acl, }), ...mapGetters({ diff --git a/src/js/components/Poll/MarkUpDescription.vue b/src/js/components/Poll/MarkUpDescription.vue index c07bdd83..776859ad 100644 --- a/src/js/components/Poll/MarkUpDescription.vue +++ b/src/js/components/Poll/MarkUpDescription.vue @@ -37,7 +37,7 @@ export default { computed: { ...mapState({ - description: state => state.poll.descriptionSafe, + description: (state) => state.poll.descriptionSafe, }), markedDescription() { diff --git a/src/js/components/Poll/ParticipantsList.vue b/src/js/components/Poll/ParticipantsList.vue index 50bff58b..2912875c 100644 --- a/src/js/components/Poll/ParticipantsList.vue +++ b/src/js/components/Poll/ParticipantsList.vue @@ -56,7 +56,7 @@ export default { computed: { ...mapState({ - poll: state => state.poll, + poll: (state) => state.poll, }), ...mapGetters({ diff --git a/src/js/components/Poll/PollInformation.vue b/src/js/components/Poll/PollInformation.vue index 3872deb7..de7a36eb 100644 --- a/src/js/components/Poll/PollInformation.vue +++ b/src/js/components/Poll/PollInformation.vue @@ -81,10 +81,10 @@ export default { computed: { ...mapState({ - share: state => state.share, - acl: state => state.poll.acl, - poll: state => state.poll, - subscribed: state => state.subscription.subscribed, + share: (state) => state.share, + acl: (state) => state.poll.acl, + poll: (state) => state.poll, + subscribed: (state) => state.subscription.subscribed, }), ...mapGetters({ diff --git a/src/js/components/Poll/PollTitle.vue b/src/js/components/Poll/PollTitle.vue index 9c9c93a8..77987619 100644 --- a/src/js/components/Poll/PollTitle.vue +++ b/src/js/components/Poll/PollTitle.vue @@ -43,9 +43,9 @@ export default { computed: { ...mapState({ - title: state => state.poll.title, - expire: state => state.poll.expire, - deleted: state => state.poll.deleted, + title: (state) => state.poll.title, + expire: (state) => state.poll.expire, + deleted: (state) => state.poll.deleted, }), ...mapGetters({ diff --git a/src/js/components/Poll/PublicRegisterModal.vue b/src/js/components/Poll/PublicRegisterModal.vue index 9a295a22..89dbb18d 100644 --- a/src/js/components/Poll/PublicRegisterModal.vue +++ b/src/js/components/Poll/PublicRegisterModal.vue @@ -107,8 +107,8 @@ export default { computed: { ...mapState({ - poll: state => state.poll, - share: state => state.share, + poll: (state) => state.poll, + share: (state) => state.share, }), disableSubmit() { diff --git a/src/js/components/Settings/ExpertimantalSettings.vue b/src/js/components/Settings/ExpertimantalSettings.vue index 7722e1e6..e0e15b1d 100644 --- a/src/js/components/Settings/ExpertimantalSettings.vue +++ b/src/js/components/Settings/ExpertimantalSettings.vue @@ -72,7 +72,7 @@ export default { computed: { ...mapState({ - settings: state => state.settings.user, + settings: (state) => state.settings.user, }), // Add bindings experimental: { diff --git a/src/js/components/Settings/FeatureSettings.vue b/src/js/components/Settings/FeatureSettings.vue index 10429008..6d4e5847 100644 --- a/src/js/components/Settings/FeatureSettings.vue +++ b/src/js/components/Settings/FeatureSettings.vue @@ -69,8 +69,8 @@ export default { computed: { ...mapState({ - settings: state => state.settings.user, - calendars: state => state.settings.availableCalendars, + settings: (state) => state.settings.user, + calendars: (state) => state.settings.availableCalendars, }), // Add bindings calendarPeek: { @@ -83,7 +83,7 @@ export default { }, calendarChoices() { - return this.calendars.map(calendar => ({ + return this.calendars.map((calendar) => ({ key: calendar.key.toString(), name: calendar.name, displayColor: calendar.displayColor, @@ -125,7 +125,7 @@ export default { async clickedCalendar(calendar) { if (this.settings.checkCalendars.includes(calendar.key)) { - await this.writeValue({ checkCalendars: this.settings.checkCalendars.filter(item => item !== calendar.key.toString()) }) + await this.writeValue({ checkCalendars: this.settings.checkCalendars.filter((item) => item !== calendar.key.toString()) }) } else { await this.$store.commit('settings/addCheckCalendar', { calendar }) } diff --git a/src/js/components/SideBar/SideBar.vue b/src/js/components/SideBar/SideBar.vue index 9b7d3318..656fe6fd 100644 --- a/src/js/components/SideBar/SideBar.vue +++ b/src/js/components/SideBar/SideBar.vue @@ -89,8 +89,8 @@ export default { computed: { ...mapState({ - poll: state => state.poll, - acl: state => state.poll.acl, + poll: (state) => state.poll, + acl: (state) => state.poll.acl, }), }, methods: { diff --git a/src/js/components/SideBar/SideBarTabComments.vue b/src/js/components/SideBar/SideBarTabComments.vue index c7330d0f..b3dedf04 100644 --- a/src/js/components/SideBar/SideBarTabComments.vue +++ b/src/js/components/SideBar/SideBarTabComments.vue @@ -49,7 +49,7 @@ export default { computed: { ...mapState({ - acl: state => state.poll.acl, + acl: (state) => state.poll.acl, }), ...mapGetters({ diff --git a/src/js/components/SideBar/SideBarTabConfiguration.vue b/src/js/components/SideBar/SideBarTabConfiguration.vue index 25e5810f..cd3be93d 100644 --- a/src/js/components/SideBar/SideBarTabConfiguration.vue +++ b/src/js/components/SideBar/SideBarTabConfiguration.vue @@ -107,8 +107,8 @@ export default { computed: { ...mapState({ - poll: state => state.poll, - acl: state => state.poll.acl, + poll: (state) => state.poll, + acl: (state) => state.poll.acl, }), ...mapGetters({ diff --git a/src/js/components/SideBar/SideBarTabOptions.vue b/src/js/components/SideBar/SideBarTabOptions.vue index b90100d6..045d2f50 100644 --- a/src/js/components/SideBar/SideBarTabOptions.vue +++ b/src/js/components/SideBar/SideBarTabOptions.vue @@ -82,8 +82,8 @@ export default { pollTypeIcon: 'poll/typeIcon', }), ...mapState({ - pollType: state => state.poll.type, - isOwner: state => state.poll.acl.isOwner, + pollType: (state) => state.poll.type, + isOwner: (state) => state.poll.acl.isOwner, }), }, } diff --git a/src/js/components/SideBar/SideBarTabShare.vue b/src/js/components/SideBar/SideBarTabShare.vue index bc84d6ae..83ef1061 100644 --- a/src/js/components/SideBar/SideBarTabShare.vue +++ b/src/js/components/SideBar/SideBarTabShare.vue @@ -53,7 +53,7 @@ export default { computed: { ...mapState({ - isOwner: state => state.poll.acl.isOwner, + isOwner: (state) => state.poll.acl.isOwner, }), }, diff --git a/src/js/components/Subscription/ActionSubscription.vue b/src/js/components/Subscription/ActionSubscription.vue index 02329b38..68fdf9ad 100644 --- a/src/js/components/Subscription/ActionSubscription.vue +++ b/src/js/components/Subscription/ActionSubscription.vue @@ -38,8 +38,8 @@ export default { computed: { ...mapState({ - subscribed: state => state.subscription.subscribed, - emailAddress: state => state.share.emailAddress, + subscribed: (state) => state.subscription.subscribed, + emailAddress: (state) => state.share.emailAddress, }), label() { diff --git a/src/js/components/Subscription/Subscription.vue b/src/js/components/Subscription/Subscription.vue index 3025f518..7f793e12 100644 --- a/src/js/components/Subscription/Subscription.vue +++ b/src/js/components/Subscription/Subscription.vue @@ -38,8 +38,8 @@ export default { computed: { ...mapState({ - subscribed: state => state.subscription.subscribed, - emailAddress: state => state.share.emailAddress, + subscribed: (state) => state.subscription.subscribed, + emailAddress: (state) => state.share.emailAddress, }), label() { diff --git a/src/js/components/User/UserMenu.vue b/src/js/components/User/UserMenu.vue index 171669be..7071de6d 100644 --- a/src/js/components/User/UserMenu.vue +++ b/src/js/components/User/UserMenu.vue @@ -85,10 +85,10 @@ export default { computed: { ...mapState({ - acl: state => state.poll.acl, - share: state => state.share, - subscribed: state => state.subscription.subscribed, - emailAddress: state => state.share.emailAddress, + acl: (state) => state.poll.acl, + share: (state) => state.share, + subscribed: (state) => state.subscription.subscribed, + emailAddress: (state) => state.share.emailAddress, }), emailAddressUnchanged() { diff --git a/src/js/components/VoteTable/VoteItem.vue b/src/js/components/VoteTable/VoteItem.vue index 9e3af83c..450a1182 100644 --- a/src/js/components/VoteTable/VoteItem.vue +++ b/src/js/components/VoteTable/VoteItem.vue @@ -47,10 +47,10 @@ export default { computed: { ...mapState({ - voteLimit: state => state.poll.voteLimit, - optionLimit: state => state.poll.optionLimit, - currentUser: state => state.poll.acl.userId, - allowVote: state => state.poll.acl.allowVote, + voteLimit: (state) => state.poll.voteLimit, + optionLimit: (state) => state.poll.optionLimit, + currentUser: (state) => state.poll.acl.userId, + allowVote: (state) => state.poll.acl.allowVote, }), ...mapGetters({ diff --git a/src/js/components/VoteTable/VoteTable.vue b/src/js/components/VoteTable/VoteTable.vue index 3db652ec..d7758e2c 100644 --- a/src/js/components/VoteTable/VoteTable.vue +++ b/src/js/components/VoteTable/VoteTable.vue @@ -125,10 +125,10 @@ export default { computed: { ...mapState({ - acl: state => state.poll.acl, - poll: state => state.poll, - share: state => state.share, - settings: state => state.settings.user, + acl: (state) => state.poll.acl, + poll: (state) => state.poll, + share: (state) => state.share, + settings: (state) => state.settings.user, }), ...mapGetters({ diff --git a/src/js/components/VoteTable/VoteTableHeaderItem.vue b/src/js/components/VoteTable/VoteTableHeaderItem.vue index fa5a56bd..13ddfd71 100644 --- a/src/js/components/VoteTable/VoteTableHeaderItem.vue +++ b/src/js/components/VoteTable/VoteTableHeaderItem.vue @@ -51,8 +51,8 @@ export default { computed: { ...mapState({ - poll: state => state.poll, - acl: state => state.poll.acl, + poll: (state) => state.poll, + acl: (state) => state.poll.acl, }), ...mapGetters({ diff --git a/src/js/main.js b/src/js/main.js index c3b29f8f..56361ad2 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -62,5 +62,5 @@ new Vue({ el: '#content', router, store, - render: h => h(App), + render: (h) => h(App), }) diff --git a/src/js/mixins/watchPolls.js b/src/js/mixins/watchPolls.js index 72c62ba4..7ad5d3dc 100644 --- a/src/js/mixins/watchPolls.js +++ b/src/js/mixins/watchPolls.js @@ -48,7 +48,7 @@ export const watchPolls = { // remove duplicates dispatches = [...new Set(dispatches)] - await Promise.all(dispatches.map(dispatches => this.$store.dispatch(dispatches))) + await Promise.all(dispatches.map((dispatches) => this.$store.dispatch(dispatches))) }, async watchPolls() { @@ -113,7 +113,7 @@ export const watchPolls = { console.error('Unhandled error watching polls', e) } console.debug('No response - request aborted - failed request', this.retryCounter) - await new Promise(resolve => setTimeout(resolve, this.retryTimeout)) + await new Promise((resolve) => setTimeout(resolve, this.retryTimeout)) } } } diff --git a/src/js/store/modules/comments.js b/src/js/store/modules/comments.js index 7d5e7bd5..59283ae8 100644 --- a/src/js/store/modules/comments.js +++ b/src/js/store/modules/comments.js @@ -49,14 +49,14 @@ const mutations = { }, delete(state, payload) { - state.list = state.list.filter(comment => { + state.list = state.list.filter((comment) => { return comment.id !== payload.comment.id }) }, } const getters = { - count: state => { + count: (state) => { return state.list.length }, } diff --git a/src/js/store/modules/index.js b/src/js/store/modules/index.js index 210d1980..df35a4be 100644 --- a/src/js/store/modules/index.js +++ b/src/js/store/modules/index.js @@ -24,7 +24,7 @@ import camelCase from 'lodash/camelCase' const requireModule = require.context('.', false, /\.js$/) const modules = {} -requireModule.keys().forEach(fileName => { +requireModule.keys().forEach((fileName) => { if (fileName === './index.js') return const moduleName = camelCase( fileName.replace(/(\.\/|\.js)/g, '') diff --git a/src/js/store/modules/options.js b/src/js/store/modules/options.js index 6bce196f..ec081542 100644 --- a/src/js/store/modules/options.js +++ b/src/js/store/modules/options.js @@ -60,7 +60,7 @@ const mutations = { }, delete(state, payload) { - state.list = state.list.filter(option => { + state.list = state.list.filter((option) => { return option.id !== payload.option.id }) }, @@ -96,13 +96,13 @@ const getters = { }, proposalsExist: (state) => { - return !!state.list.filter(option => { + return !!state.list.filter((option) => { return option.owner }).length }, - confirmed: state => { - return state.list.filter(option => { + confirmed: (state) => { + return state.list.filter((option) => { return option.confirmed > 0 }) }, diff --git a/src/js/store/modules/poll.js b/src/js/store/modules/poll.js index 07774c95..656158f9 100644 --- a/src/js/store/modules/poll.js +++ b/src/js/store/modules/poll.js @@ -128,7 +128,7 @@ const getters = { }, participants: (state, getters, rootState) => { - const participants = rootState.votes.list.map(item => ({ + const participants = rootState.votes.list.map((item) => ({ userId: item.userId, displayName: item.displayName, isNoUser: item.isNoUser, @@ -136,7 +136,7 @@ const getters = { })) // add current user, if not among participants and voting is allowed - if (!participants.find(item => item.userId === state.acl.userId) && state.acl.userId && state.acl.allowVote) { + if (!participants.find((item) => item.userId === state.acl.userId) && state.acl.userId && state.acl.allowVote) { participants.push({ userId: state.acl.userId, displayName: state.acl.displayName, @@ -150,7 +150,7 @@ const getters = { }, participantsVoted: (state, getters, rootState) => { - return uniqueArrayOfObjects(rootState.votes.list.map(item => ({ + return uniqueArrayOfObjects(rootState.votes.list.map((item) => ({ userId: item.userId, displayName: item.displayName, isNoUser: item.isNoUser, diff --git a/src/js/store/modules/polls.js b/src/js/store/modules/polls.js index 2596aafd..31832113 100644 --- a/src/js/store/modules/polls.js +++ b/src/js/store/modules/polls.js @@ -107,11 +107,11 @@ const mutations = { const getters = { filtered: (state) => (filterId) => { if (filterId === 'all') { - return state.list.filter(poll => (!poll.deleted)) + return state.list.filter((poll) => (!poll.deleted)) } else if (filterId === 'my') { - return state.list.filter(poll => (poll.owner === getCurrentUser().uid && !poll.deleted)) + return state.list.filter((poll) => (poll.owner === getCurrentUser().uid && !poll.deleted)) } else if (filterId === 'relevant') { - return state.list.filter(poll => (( + return state.list.filter((poll) => (( poll.important || poll.userHasVoted || poll.isOwner @@ -121,15 +121,15 @@ const getters = { && !(poll.expire > 0 && moment.unix(poll.expire).diff(moment(), 'days') < -4) )) } else if (filterId === 'public') { - return state.list.filter(poll => (poll.access === 'public' && !poll.deleted)) + return state.list.filter((poll) => (poll.access === 'public' && !poll.deleted)) } else if (filterId === 'hidden') { - return state.list.filter(poll => (poll.access === 'hidden' && !poll.deleted)) + return state.list.filter((poll) => (poll.access === 'hidden' && !poll.deleted)) } else if (filterId === 'deleted') { - return state.list.filter(poll => (poll.deleted)) + return state.list.filter((poll) => (poll.deleted)) } else if (filterId === 'participated') { - return state.list.filter(poll => (poll.userHasVoted)) + return state.list.filter((poll) => (poll.userHasVoted)) } else if (filterId === 'closed') { - return state.list.filter(poll => ( + return state.list.filter((poll) => ( poll.expire > 0 && moment.unix(poll.expire).diff() < 0 && !poll.deleted )) } diff --git a/src/js/store/modules/settings.js b/src/js/store/modules/settings.js index 999acfaa..0b6ad4ec 100644 --- a/src/js/store/modules/settings.js +++ b/src/js/store/modules/settings.js @@ -71,7 +71,7 @@ const mutations = { payload.defaultViewDatePoll = 'list-view' } - Object.keys(payload).filter(key => key in state.user).forEach(key => { + Object.keys(payload).filter((key) => key in state.user).forEach((key) => { state.user[key] = payload[key] }) }, diff --git a/src/js/store/modules/shares.js b/src/js/store/modules/shares.js index f93e4cd0..3a9b7633 100644 --- a/src/js/store/modules/shares.js +++ b/src/js/store/modules/shares.js @@ -40,7 +40,7 @@ const mutations = { }, delete(state, payload) { - state.list = state.list.filter(share => { + state.list = state.list.filter((share) => { return share.id !== payload.share.id }) }, @@ -54,32 +54,32 @@ const mutations = { }, update(state, payload) { - const foundIndex = state.list.findIndex(share => share.id === payload.share.id) + const foundIndex = state.list.findIndex((share) => share.id === payload.share.id) Object.assign(state.list[foundIndex], payload.share) }, } const getters = { - invitation: state => { + invitation: (state) => { // share types, which will be active, after the user gets his invitation const invitationTypes = ['email', 'external', 'contact'] // sharetype which are active without sending an invitation const directShareTypes = ['user', 'group'] - return state.list.filter(share => { + return state.list.filter((share) => { return (invitationTypes.includes(share.type) && (share.type === 'external' || share.invitationSent)) || directShareTypes.includes(share.type) }) }, - unsentInvitations: state => { - return state.list.filter(share => { + unsentInvitations: (state) => { + return state.list.filter((share) => { return (share.emailAddress || share.type === 'group' || share.type === 'contactGroup' || share.type === 'circle') && !share.invitationSent }) }, - public: state => { + public: (state) => { const invitationTypes = ['public'] - return state.list.filter(share => { + return state.list.filter((share) => { return invitationTypes.includes(share.type) }) }, diff --git a/src/js/store/modules/votes.js b/src/js/store/modules/votes.js index d5a361dc..4eeea28f 100644 --- a/src/js/store/modules/votes.js +++ b/src/js/store/modules/votes.js @@ -43,11 +43,11 @@ const mutations = { }, deleteVotes(state, payload) { - state.list = state.list.filter(vote => vote.userId !== payload.userId) + state.list = state.list.filter((vote) => vote.userId !== payload.userId) }, setItem(state, payload) { - const index = state.list.findIndex(vote => + const index = state.list.findIndex((vote) => parseInt(vote.pollId) === payload.pollId && vote.userId === payload.vote.userId && vote.voteOptionText === payload.option.pollOptionText) @@ -70,11 +70,11 @@ const getters = { }, countVotes: (state, getters, rootState) => (answer) => { - return getters.relevant.filter(vote => vote.userId === rootState.poll.acl.userId && vote.voteAnswer === answer).length + return getters.relevant.filter((vote) => vote.userId === rootState.poll.acl.userId && vote.voteAnswer === answer).length }, getVote: (state) => (payload) => { - const found = state.list.find(vote => { + const found = state.list.find((vote) => { return (vote.userId === payload.userId && vote.voteOptionText === payload.option.pollOptionText) }) diff --git a/src/js/views/Administration.vue b/src/js/views/Administration.vue index af3f5204..3ce6326c 100644 --- a/src/js/views/Administration.vue +++ b/src/js/views/Administration.vue @@ -219,7 +219,7 @@ export default { refreshView() { window.document.title = t('polls', 'Polls') + ' - ' + this.title - if (!this.filteredPolls(this.$route.params.type).find(poll => { + if (!this.filteredPolls(this.$route.params.type).find((poll) => { return poll.id === this.$store.state.poll.id })) { emit('toggle-sidebar', { open: false }) diff --git a/src/js/views/PollList.vue b/src/js/views/PollList.vue index ef63f223..252472f8 100644 --- a/src/js/views/PollList.vue +++ b/src/js/views/PollList.vue @@ -118,7 +118,7 @@ export default { computed: { ...mapState({ - pollCategories: state => state.polls.categories, + pollCategories: (state) => state.polls.categories, }), ...mapGetters({ @@ -126,13 +126,13 @@ export default { }), title() { - return this.pollCategories.find(category => { + return this.pollCategories.find((category) => { return (category.id === this.$route.params.type) }).titleExt }, description() { - return this.pollCategories.find(category => { + return this.pollCategories.find((category) => { return (category.id === this.$route.params.type) }).description }, @@ -181,7 +181,7 @@ export default { refreshView() { window.document.title = t('polls', 'Polls') + ' - ' + this.title - if (!this.filteredPolls(this.$route.params.type).find(poll => { + if (!this.filteredPolls(this.$route.params.type).find((poll) => { return poll.id === this.$store.state.poll.id })) { emit('toggle-sidebar', { open: false }) diff --git a/src/js/views/Vote.vue b/src/js/views/Vote.vue index 6549544d..6ee023ef 100644 --- a/src/js/views/Vote.vue +++ b/src/js/views/Vote.vue @@ -108,10 +108,10 @@ export default { computed: { ...mapState({ - poll: state => state.poll, - acl: state => state.poll.acl, - share: state => state.share, - settings: state => state.settings, + poll: (state) => state.poll, + acl: (state) => state.poll.acl, + share: (state) => state.share, + settings: (state) => state.settings, }), ...mapGetters({ |