From 65e327e1a93ceb180c02d63e1a39133f1478bd10 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 17 Sep 2022 16:01:16 +0530 Subject: [PATCH] fix(gui): add fallback for copy to clipboard re #3598 Signed-off-by: Pranav C --- packages/nc-gui/components.d.ts | 1 + .../smartsheet-toolbar/ShareView.vue | 4 +-- .../smartsheet-toolbar/SharedViewList.vue | 4 +-- .../components/smartsheet/ApiSnippet.vue | 4 +-- .../nc-gui/components/smartsheet/Grid.vue | 4 +-- .../tabs/auth/ApiTokenManagement.vue | 4 +-- .../components/tabs/auth/UserManagement.vue | 4 +-- .../tabs/auth/user-management/ShareBase.vue | 4 +-- .../tabs/auth/user-management/UsersModal.vue | 4 +-- packages/nc-gui/composables/index.ts | 1 + .../composables/useColumnCreateStore.ts | 1 - packages/nc-gui/composables/useCopy.ts | 26 +++++++++++++++++++ .../pages/[projectType]/[projectId]/index.vue | 4 +-- 13 files changed, 46 insertions(+), 19 deletions(-) create mode 100644 packages/nc-gui/composables/useCopy.ts diff --git a/packages/nc-gui/components.d.ts b/packages/nc-gui/components.d.ts index abfefb9a7b..ed6ae88878 100644 --- a/packages/nc-gui/components.d.ts +++ b/packages/nc-gui/components.d.ts @@ -232,6 +232,7 @@ declare module '@vue/runtime-core' { MdiUpload: typeof import('~icons/mdi/upload')['default'] MdiUploadOutline: typeof import('~icons/mdi/upload-outline')['default'] MdiViewListOutline: typeof import('~icons/mdi/view-list-outline')['default'] + MdiWarning: typeof import('~icons/mdi/warning')['default'] MdiWhatsapp: typeof import('~icons/mdi/whatsapp')['default'] MdiXml: typeof import('~icons/mdi/xml')['default'] MiCircleWarning: typeof import('~icons/mi/circle-warning')['default'] diff --git a/packages/nc-gui/components/smartsheet-toolbar/ShareView.vue b/packages/nc-gui/components/smartsheet-toolbar/ShareView.vue index 10dc3fd6bd..0484072fce 100644 --- a/packages/nc-gui/components/smartsheet-toolbar/ShareView.vue +++ b/packages/nc-gui/components/smartsheet-toolbar/ShareView.vue @@ -4,7 +4,7 @@ import { message } from 'ant-design-vue' import { computed, extractSdkResponseErrorMsg, - useClipboard, + useCopy, useI18n, useNuxtApp, useProject, @@ -17,7 +17,7 @@ const { t } = useI18n() const { view, $api } = useSmartsheetStoreOrThrow() -const { copy } = useClipboard() +const { copy } = useCopy() const { $e } = useNuxtApp() diff --git a/packages/nc-gui/components/smartsheet-toolbar/SharedViewList.vue b/packages/nc-gui/components/smartsheet-toolbar/SharedViewList.vue index db39f24e17..138c55fbd0 100644 --- a/packages/nc-gui/components/smartsheet-toolbar/SharedViewList.vue +++ b/packages/nc-gui/components/smartsheet-toolbar/SharedViewList.vue @@ -1,7 +1,7 @@