From 247d115f8a2b9a6aa44672c1885671538480cf33 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Wed, 15 Mar 2023 13:28:54 +0100 Subject: [PATCH] Properly inject the loadingService --- .../src/views/Users.vue | 3 ++- .../src/components/AppBar/CreateAndUpload.vue | 1 + .../components/FilesList/KeyboardActions.vue | 16 +++--------- .../src/helpers/resource/actions/transfer.ts | 5 ++-- .../src/mixins/actions/downloadArchive.ts | 3 +-- .../src/mixins/actions/emptyTrashBin.ts | 3 +-- .../web-app-files/src/mixins/actions/paste.ts | 1 + .../src/mixins/actions/restore.ts | 4 +-- .../src/mixins/deleteResources.ts | 4 +-- packages/web-app-files/src/store/actions.ts | 4 ++- .../src/views/spaces/GenericSpace.vue | 1 + .../resource/resourcesTransfer.spec.ts | 12 +++++++-- .../unit/mixins/actions/emptyTrashBin.spec.ts | 10 ++++--- .../tests/unit/mixins/actions/restore.spec.ts | 2 +- .../src/components/LoadingIndicator.vue | 5 ++-- packages/web-pkg/src/composables/index.ts | 1 + .../src/composables/loadingService/index.ts | 1 + .../loadingService/useLoadingService.ts | 6 +++++ .../web-pkg/src/services/loadingService.ts | 2 -- .../unit/components/LoadingIndicator.spec.ts | 26 ++++++++----------- .../web-runtime/src/container/bootstrap.ts | 10 ++++++- packages/web-runtime/src/index.ts | 4 ++- .../src/mocks/defaultComponentMocks.ts | 11 +++++--- 23 files changed, 81 insertions(+), 54 deletions(-) create mode 100644 packages/web-pkg/src/composables/loadingService/index.ts create mode 100644 packages/web-pkg/src/composables/loadingService/useLoadingService.ts diff --git a/packages/web-app-admin-settings/src/views/Users.vue b/packages/web-app-admin-settings/src/views/Users.vue index 23107cf10f2..c35e26193b7 100644 --- a/packages/web-app-admin-settings/src/views/Users.vue +++ b/packages/web-app-admin-settings/src/views/Users.vue @@ -170,6 +170,7 @@ import { useAccessToken, useCapabilitySpacesMaxQuota, useGraphClient, + useLoadingService, useRouteQuery, useStore } from 'web-pkg/src/composables' @@ -200,7 +201,6 @@ import GroupsModal from '../components/Users/GroupsModal.vue' import { useRemoveFromGroups } from '../mixins/users/removeFromGroups' import { useAddToGroups } from '../mixins/users/addToGroups' import { configurationManager } from 'web-pkg' -import { loadingService } from 'web-pkg/src/services' export default defineComponent({ name: 'UsersView', @@ -221,6 +221,7 @@ export default defineComponent({ const store = useStore() const accessToken = useAccessToken({ store }) const { graphClient } = useGraphClient() + const loadingService = useLoadingService() const { actions: removeFromGroupsActions } = useRemoveFromGroups() const { actions: addToGroupsActions } = useAddToGroups() diff --git a/packages/web-app-files/src/components/AppBar/CreateAndUpload.vue b/packages/web-app-files/src/components/AppBar/CreateAndUpload.vue index 058bb09083c..062d7ace6c4 100644 --- a/packages/web-app-files/src/components/AppBar/CreateAndUpload.vue +++ b/packages/web-app-files/src/components/AppBar/CreateAndUpload.vue @@ -341,6 +341,7 @@ export default defineComponent({ this.pasteSelectedFiles({ targetSpace: this.space, clientService: this.$clientService, + loadingService: this.$loadingService, createModal: this.createModal, hideModal: this.hideModal, showMessage: this.showMessage, diff --git a/packages/web-app-files/src/components/FilesList/KeyboardActions.vue b/packages/web-app-files/src/components/FilesList/KeyboardActions.vue index 5624eafacfa..edf8135211a 100644 --- a/packages/web-app-files/src/components/FilesList/KeyboardActions.vue +++ b/packages/web-app-files/src/components/FilesList/KeyboardActions.vue @@ -5,19 +5,10 @@