From d3d09a59097db45f1ab355f8048a620464485266 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Fri, 1 Dec 2023 10:14:34 +0100 Subject: [PATCH] refactor: register file quick actions as extensions --- .../enhancement-quick-actions-via-extension | 8 ++ .../src/components/FilesList/QuickActions.vue | 56 +++++------- packages/web-app-files/src/extensions.ts | 52 ++++++++++- packages/web-app-files/src/index.ts | 3 +- .../web-app-files/src/views/Favorites.vue | 6 +- .../src/views/spaces/GenericSpace.vue | 2 +- .../components/FilesList/QuickActions.spec.ts | 28 +++--- packages/web-pkg/src/apps/types.ts | 7 +- .../files/useFileActionsCreateQuicklink.ts | 8 +- .../actions/files/useFileActionsShowShares.ts | 10 +-- packages/web-pkg/src/composables/index.ts | 1 + .../web-pkg/src/composables/shares/index.ts | 1 + .../src/composables/shares/useCanShare.ts | 21 +++++ packages/web-pkg/src/helpers/share/link.ts | 25 +++++- packages/web-pkg/src/index.ts | 2 - packages/web-pkg/src/quickActions.ts | 88 ------------------- 16 files changed, 157 insertions(+), 161 deletions(-) create mode 100644 changelog/unreleased/enhancement-quick-actions-via-extension create mode 100644 packages/web-pkg/src/composables/shares/index.ts create mode 100644 packages/web-pkg/src/composables/shares/useCanShare.ts delete mode 100644 packages/web-pkg/src/quickActions.ts diff --git a/changelog/unreleased/enhancement-quick-actions-via-extension b/changelog/unreleased/enhancement-quick-actions-via-extension new file mode 100644 index 00000000000..00036aa65b6 --- /dev/null +++ b/changelog/unreleased/enhancement-quick-actions-via-extension @@ -0,0 +1,8 @@ +Enhancement: Registering quick actions as extension + +Quick actions can now registered as extension via our extension registry. They need to be of type `action` and have the `files.quick-action` scope. + +The old way of registering quick actions via the `quickaction` property of an app is now officially deprecated. + +https://github.com/owncloud/web/pull/10102 +https://github.com/owncloud/web/issues/7338 diff --git a/packages/web-app-files/src/components/FilesList/QuickActions.vue b/packages/web-app-files/src/components/FilesList/QuickActions.vue index cced6d97b95..c6835d335e1 100644 --- a/packages/web-app-files/src/components/FilesList/QuickActions.vue +++ b/packages/web-app-files/src/components/FilesList/QuickActions.vue @@ -2,15 +2,13 @@
@@ -18,48 +16,36 @@