diff options
author | Simon L <szaimen@e.mail.de> | 2023-02-02 16:05:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 16:05:13 +0100 |
commit | 6f3c4f2255ed73601fa5eac3048d679caa3065e0 (patch) | |
tree | a2080e0c103fbb5376a2dc6cbb2b94585feb1730 /apps/files_sharing | |
parent | db30974348ee88fbf81d9cc0f1a1071d1adcbd09 (diff) | |
parent | edcf675e6e0e8ab1388e6bccc7f00b9dffa0dc91 (diff) | |
download | nextcloud-server-6f3c4f2255ed73601fa5eac3048d679caa3065e0.tar.gz nextcloud-server-6f3c4f2255ed73601fa5eac3048d679caa3065e0.zip |
Merge pull request #36450 from nextcloud/fix/clipboard-copy
Drop vue-clipboard2 in favour of native Clipboard API to fix copy to clipboard
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryInternal.vue | 2 | ||||
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 2 | ||||
-rw-r--r-- | apps/files_sharing/src/files_sharing_tab.js | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryInternal.vue b/apps/files_sharing/src/components/SharingEntryInternal.vue index dc76f219879..d3b55d4991c 100644 --- a/apps/files_sharing/src/components/SharingEntryInternal.vue +++ b/apps/files_sharing/src/components/SharingEntryInternal.vue @@ -84,7 +84,7 @@ export default { methods: { async copyLink() { try { - await this.$copyText(this.internalLink) + await navigator.clipboard.writeText(this.internalLink) showSuccess(t('files_sharing', 'Link copied')) // focus and show the tooltip (note: cannot set ref on NcActionLink) this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus() diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index dcdebe2e8c5..7622efa6fac 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -769,7 +769,7 @@ export default { }, async copyLink() { try { - await this.$copyText(this.shareLink) + await navigator.clipboard.writeText(this.shareLink) showSuccess(t('files_sharing', 'Link copied')) // focus and show the tooltip this.$refs.copyButton.$el.focus() diff --git a/apps/files_sharing/src/files_sharing_tab.js b/apps/files_sharing/src/files_sharing_tab.js index 85bbd869932..8858f35570f 100644 --- a/apps/files_sharing/src/files_sharing_tab.js +++ b/apps/files_sharing/src/files_sharing_tab.js @@ -22,7 +22,6 @@ */ import Vue from 'vue' -import VueClipboard from 'vue-clipboard2' import { translate as t, translatePlural as n } from '@nextcloud/l10n' import SharingTab from './views/SharingTab.vue' @@ -45,7 +44,6 @@ Object.assign(window.OCA.Sharing, { ShareTabSections: new TabSections() }) Vue.prototype.t = t Vue.prototype.n = n -Vue.use(VueClipboard) // Init Sharing tab component const View = Vue.extend(SharingTab) |