diff --git a/apps/files/src/components/FileLinkSidebar.vue b/apps/files/src/components/FileLinkSidebar.vue index cba0cbc23a2..3d54d1efce0 100644 --- a/apps/files/src/components/FileLinkSidebar.vue +++ b/apps/files/src/components/FileLinkSidebar.vue @@ -18,8 +18,7 @@ @@ -101,6 +100,7 @@ import { mapGetters, mapActions, mapState } from 'vuex' import moment from 'moment' import mixins from '../mixins' +import copyToClipboard from 'copy-to-clipboard' import { shareTypes } from '../helpers/shareTypes' import { getParentPaths } from '../helpers/path' import { dirname } from 'path' @@ -283,6 +283,10 @@ export default { this.$_resetData() this.visiblePanel = PANEL_EDIT }, + $_copyPrivateLinkToClipboard() { + copyToClipboard(this.$_privateLinkOfHighlightedFile) + this.$_clipboardSuccessHandler({ action: 'copy', text: this.$_privateLinkOfHighlightedFile }) + }, $_clipboardSuccessHandler(event) { this.$set(this.linksCopied, event.text, true) setTimeout(() => { diff --git a/apps/files/src/components/PublicLinksSidebar/PublicLinkListItem.vue b/apps/files/src/components/PublicLinksSidebar/PublicLinkListItem.vue index e0cde663b8c..150d6f150d0 100644 --- a/apps/files/src/components/PublicLinksSidebar/PublicLinkListItem.vue +++ b/apps/files/src/components/PublicLinksSidebar/PublicLinkListItem.vue @@ -63,8 +63,7 @@ > @@ -101,6 +100,7 @@