Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed vue-clipboard2 from package.json #3593

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/files/src/components/FileLinkSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
<oc-icon
v-if="!linksCopied[$_privateLinkOfHighlightedFile]"
id="files-sidebar-private-link-label"
v-clipboard:copy="$_privateLinkOfHighlightedFile"
v-clipboard:success="$_clipboardSuccessHandler"
@click="$_copyPrivateLinkToClipboard()"
name="copy_to_clipboard"
size="small"
/>
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
>
<oc-icon
v-if="!linksCopied[link.url]"
v-clipboard:copy="link.url"
v-clipboard:success="$_clipboardSuccessHandler"
@click="$_copyPublicLinkToClipboard()"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the click pls to the wrapping button.

name="copy_to_clipboard"
size="small"
/>
Expand Down Expand Up @@ -101,6 +100,7 @@
<script>
import { basename, dirname } from 'path'
import mixins from '../../mixins'
import copyToClipboard from 'copy-to-clipboard'

export default {
name: 'PublicLinkListItem',
Expand Down Expand Up @@ -174,12 +174,13 @@ export default {
}
},
methods: {
$_clipboardSuccessHandler(event) {
this.$emit('onCopy', event)
},
$_removeLink() {
this.removalInProgress = true
this.$emit('onDelete', this.link)
},
$_copyPublicLinkToClipboard() {
copyToClipboard(this.link.url)
this.$emit('onCopy', { action: 'copy', text: this.link.url })
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions changelog/unreleased/3593
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Change: Removed vue-clipboard2 from the package.json file

We've removed the vue-clipboard2 package as there is also the
copy-to-clipboard package which does work in vue templates as
well as in plain js files

https://github.com/owncloud/phoenix/issues/3588
https://github.com/owncloud/phoenix/pull/3593
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
"tus-js-client": "^1.8.0",
"url-search-params-polyfill": "^8.0.0",
"vue": "^2.6.10",
"vue-clipboard2": "^0.3.1",
"vue-drag-drop": "^1.1.4",
"vue-events": "^3.1.0",
"vue-gettext": "^2.1.5",
Expand Down
2 changes: 0 additions & 2 deletions src/phoenix.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import router from './router'

import VueEvents from 'vue-events'
import VueRouter from 'vue-router'
import VueClipboard from 'vue-clipboard2'
import VueScrollTo from 'vue-scrollto'
import VueMeta from 'vue-meta'
import Vue2TouchEvents from 'vue2-touch-events'
Expand Down Expand Up @@ -57,7 +56,6 @@ Vue.prototype.$client = new OwnCloud()
Vue.use(VueEvents)
Vue.use(VueRouter)
Vue.use(DesignSystem)
Vue.use(VueClipboard)
Vue.use(VueScrollTo)
Vue.use(MediaSource)
Vue.use(PhoenixPlugin)
Expand Down
38 changes: 0 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2354,15 +2354,6 @@ cli-width@^2.0.0:
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48"
integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==

clipboard@^2.0.0:
version "2.0.6"
resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376"
integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==
dependencies:
good-listener "^1.2.2"
select "^1.1.2"
tiny-emitter "^2.0.0"

cliui@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
Expand Down Expand Up @@ -3090,11 +3081,6 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=

delegate@^3.1.2:
version "3.2.0"
resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166"
integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==

depd@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
Expand Down Expand Up @@ -4586,13 +4572,6 @@ globby@^7.1.1:
pify "^3.0.0"
slash "^1.0.0"

good-listener@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50"
integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=
dependencies:
delegate "^3.1.2"

graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2:
version "4.2.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
Expand Down Expand Up @@ -8314,11 +8293,6 @@ select-hose@^2.0.0:
resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=

select@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d"
integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=

selenium-webdriver@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz#2ba87a1662c020b8988c981ae62cb2a01298eafc"
Expand Down Expand Up @@ -9158,11 +9132,6 @@ timers-browserify@^2.0.4:
dependencies:
setimmediate "^1.0.4"

tiny-emitter@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423"
integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==

tinycolor2@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8"
Expand Down Expand Up @@ -9643,13 +9612,6 @@ vue-avatar@^2.2.0:
resolved "https://registry.yarnpkg.com/vue-avatar/-/vue-avatar-2.3.0.tgz#6cd434575a803e5c4c52ef24b1382b14a24c6336"
integrity sha512-/zeMhHV0OWp4ESvcX3OIVXUCT1IwCS/18StQh6Q2hqUJwhN3knWG8ktKzJt45rVp9whMXDGg8qDNZKzz3LfRmw==

vue-clipboard2@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/vue-clipboard2/-/vue-clipboard2-0.3.1.tgz#6e551fb7bd384889b28b0da3b12289ed6bca4894"
integrity sha512-H5S/agEDj0kXjUb5GP2c0hCzIXWRBygaWLN3NEFsaI9I3uWin778SFEMt8QRXiPG+7anyjqWiw2lqcxWUSfkYg==
dependencies:
clipboard "^2.0.0"

vue-datetime@^1.0.0-beta.10:
version "1.0.0-beta.13"
resolved "https://registry.yarnpkg.com/vue-datetime/-/vue-datetime-1.0.0-beta.13.tgz#ac874b7961a1ab00bddeaceb6d10ab01ce797e60"
Expand Down