Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2021-04-19 00:01:15 +0300
committerdartcafe <github@dartcafe.de>2021-04-19 00:01:15 +0300
commit52d0ea73368123a37e7cff11810d1fcced2ecf70 (patch)
tree243b38f44175c2b8b2882bd0d195b06388769723 /src/js/store/modules/shares.js
parent43e516fd48128c94b045c83674fe5970e61cee2d (diff)
arrow-body-style
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/store/modules/shares.js')
-rw-r--r--src/js/store/modules/shares.js26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/js/store/modules/shares.js b/src/js/store/modules/shares.js
index 3a9b7633..ca08f437 100644
--- a/src/js/store/modules/shares.js
+++ b/src/js/store/modules/shares.js
@@ -24,11 +24,9 @@
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
-const defaultShares = () => {
- return {
- list: [],
- }
-}
+const defaultShares = () => ({
+ list: [],
+})
const state = defaultShares()
@@ -40,9 +38,7 @@ const mutations = {
},
delete(state, payload) {
- state.list = state.list.filter((share) => {
- return share.id !== payload.share.id
- })
+ state.list = state.list.filter((share) => share.id !== payload.share.id)
},
reset(state) {
@@ -66,22 +62,14 @@ const getters = {
const invitationTypes = ['email', 'external', 'contact']
// sharetype which are active without sending an invitation
const directShareTypes = ['user', 'group']
- return state.list.filter((share) => {
- return (invitationTypes.includes(share.type) && (share.type === 'external' || share.invitationSent)) || directShareTypes.includes(share.type)
- })
+ return state.list.filter((share) => (invitationTypes.includes(share.type) && (share.type === 'external' || share.invitationSent)) || directShareTypes.includes(share.type))
},
- unsentInvitations: (state) => {
- return state.list.filter((share) => {
- return (share.emailAddress || share.type === 'group' || share.type === 'contactGroup' || share.type === 'circle') && !share.invitationSent
- })
- },
+ unsentInvitations: (state) => state.list.filter((share) => (share.emailAddress || share.type === 'group' || share.type === 'contactGroup' || share.type === 'circle') && !share.invitationSent),
public: (state) => {
const invitationTypes = ['public']
- return state.list.filter((share) => {
- return invitationTypes.includes(share.type)
- })
+ return state.list.filter((share) => invitationTypes.includes(share.type))
},
}