From d6efc531f6999b90330ec62869261be97dbe823f Mon Sep 17 00:00:00 2001 From: nfebe Date: Mon, 18 Nov 2024 17:34:55 +0100 Subject: [PATCH 1/3] refactor: Use new `ShareType` across file_sharing Signed-off-by: nfebe --- apps/dav/src/components/AbsenceForm.vue | 2 +- .../src/components/FileListFilterAccount.vue | 2 +- .../src/components/SharingEntry.vue | 20 ++++--- .../src/components/SharingEntryLink.vue | 2 +- .../SharingEntryQuickShareSelect.vue | 6 +- .../src/components/SharingInput.vue | 52 +++++++----------- apps/files_sharing/src/mixins/ShareTypes.js | 14 ----- apps/files_sharing/src/mixins/SharesMixin.js | 9 +-- .../src/services/ExternalShareActions.js | 2 +- apps/files_sharing/src/share.js | 26 ++++----- apps/files_sharing/src/sharebreadcrumbview.js | 4 +- .../files_sharing/src/utils/NodeShareUtils.ts | 10 ++-- apps/files_sharing/src/utils/SharedWithMe.js | 8 +-- .../src/views/SharingDetailsTab.vue | 55 +++++++++---------- .../src/views/SharingLinkList.vue | 7 ++- apps/files_sharing/src/views/SharingList.vue | 6 +- apps/files_sharing/src/views/SharingTab.vue | 16 +++--- package-lock.json | 9 ++- package.json | 4 +- 19 files changed, 114 insertions(+), 140 deletions(-) delete mode 100644 apps/files_sharing/src/mixins/ShareTypes.js diff --git a/apps/dav/src/components/AbsenceForm.vue b/apps/dav/src/components/AbsenceForm.vue index 2f78ac3ab79b7..2e2dff8551ee4 100644 --- a/apps/dav/src/components/AbsenceForm.vue +++ b/apps/dav/src/components/AbsenceForm.vue @@ -141,7 +141,7 @@ export default { async getSuggestions(search) { const shareType = [ - ShareType.SHARE_TYPE_USER, + ShareType.User, ] let request = null diff --git a/apps/files_sharing/src/components/FileListFilterAccount.vue b/apps/files_sharing/src/components/FileListFilterAccount.vue index 9d69d70fa3f71..89cedbf1ed8ea 100644 --- a/apps/files_sharing/src/components/FileListFilterAccount.vue +++ b/apps/files_sharing/src/components/FileListFilterAccount.vue @@ -39,6 +39,7 @@ import type { IAccountData } from '../filters/AccountFilter.ts' import { translate as t } from '@nextcloud/l10n' +import { ShareType } from '@nextcloud/sharing' import { mdiAccountMultiple } from '@mdi/js' import { useBrowserLocation } from '@vueuse/core' import { computed, ref, watch } from 'vue' @@ -49,7 +50,6 @@ import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' import NcActionInput from '@nextcloud/vue/dist/Components/NcActionInput.js' import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js' import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js' -import { ShareType } from '@nextcloud/sharing' interface IUserSelectData { id: string diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue index 7af7354efbaee..a03ffab9fa170 100644 --- a/apps/files_sharing/src/components/SharingEntry.vue +++ b/apps/files_sharing/src/components/SharingEntry.vue @@ -6,7 +6,7 @@