From fb2c3940e73da9b5c2f02110f20a5a7ba67139f6 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 25 May 2021 15:58:07 +0200 Subject: [PATCH 1/7] Move copy to clipboard into component and show toast --- .../CopyToClipboardButton.vue | 75 +++++++++++++++++++ .../PublicLinksSidebar/LinkInfo.vue | 70 ++++++++--------- .../PublicLinksSidebar/PrivateLinkItem.vue | 52 +++++-------- .../FilesPageElement/publicLinksDialog.js | 5 ++ 4 files changed, 130 insertions(+), 72 deletions(-) create mode 100644 packages/web-app-files/src/components/PublicLinksSidebar/CopyToClipboardButton.vue diff --git a/packages/web-app-files/src/components/PublicLinksSidebar/CopyToClipboardButton.vue b/packages/web-app-files/src/components/PublicLinksSidebar/CopyToClipboardButton.vue new file mode 100644 index 00000000000..dbf1612a284 --- /dev/null +++ b/packages/web-app-files/src/components/PublicLinksSidebar/CopyToClipboardButton.vue @@ -0,0 +1,75 @@ + + + diff --git a/packages/web-app-files/src/components/PublicLinksSidebar/LinkInfo.vue b/packages/web-app-files/src/components/PublicLinksSidebar/LinkInfo.vue index 152107af1c6..98689b21a45 100644 --- a/packages/web-app-files/src/components/PublicLinksSidebar/LinkInfo.vue +++ b/packages/web-app-files/src/components/PublicLinksSidebar/LinkInfo.vue @@ -9,29 +9,16 @@ - - - - + @@ -73,10 +60,11 @@ - From 636508e77bf4ad2ce053db0d15c954e52292473e Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 25 May 2021 16:30:18 +0200 Subject: [PATCH 4/7] Get rid of unused vue-clipboard2 dependency --- packages/web-runtime/package.json | 1 - packages/web-runtime/src/index.js | 2 -- yarn.lock | 38 ------------------------------- 3 files changed, 41 deletions(-) diff --git a/packages/web-runtime/package.json b/packages/web-runtime/package.json index 36f3504cead..0bc35def226 100644 --- a/packages/web-runtime/package.json +++ b/packages/web-runtime/package.json @@ -22,7 +22,6 @@ "uikit": "3.5.16", "vue": "^2.6.10", "vue-axe": "^2.4.4", - "vue-clipboard2": "^0.3.1", "vue-datetime": "^1.0.0-beta.10", "vue-drag-drop": "^1.1.4", "vue-events": "^3.1.0", diff --git a/packages/web-runtime/src/index.js b/packages/web-runtime/src/index.js index bcbd30d8247..c7bb63c25ac 100644 --- a/packages/web-runtime/src/index.js +++ b/packages/web-runtime/src/index.js @@ -19,7 +19,6 @@ import router from './router' import VueResize from 'vue-resize' 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' @@ -66,7 +65,6 @@ Vue.prototype.$client = new OwnCloud() Vue.use(VueEvents) Vue.use(VueRouter) -Vue.use(VueClipboard) Vue.use(VueScrollTo) Vue.use(MediaSource) Vue.use(WebPlugin) diff --git a/yarn.lock b/yarn.lock index 94bebada7b9..568ec9a6fbe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2718,15 +2718,6 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== -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" @@ -3601,11 +3592,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== - depcheck@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-1.3.1.tgz#b4765503da3e6ba1f3810dad0c34c0a649e7e91d" @@ -4965,13 +4951,6 @@ globby@^11.0.1: merge2 "^1.3.0" slash "^3.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.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" @@ -9574,11 +9553,6 @@ seed-random@~2.2.0: resolved "https://registry.yarnpkg.com/seed-random/-/seed-random-2.2.0.tgz#2a9b19e250a817099231a5b99a4daf80b7fbed54" integrity sha1-KpsZ4lCoFwmSMaW5mk2vgLf77VQ= -select@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" - integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= - semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -10300,11 +10274,6 @@ timsort@^0.3.0: resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= -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.1.2: version "1.4.2" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" @@ -10785,13 +10754,6 @@ vue-axe@^2.4.4: resolved "https://registry.yarnpkg.com/vue-axe/-/vue-axe-2.4.4.tgz#fbe7ee93bc7e4cacf9dac0a1b0cfaa9e91f66dda" integrity sha512-zIhIenmvSzzDYLSGMRCZWHPXGryW5qAWNSKGzuzgn1/tK9zwYpWXagIihD91egyHKz9yWkPjcTO25bnxq9/OPg== -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.14" resolved "https://registry.yarnpkg.com/vue-datetime/-/vue-datetime-1.0.0-beta.14.tgz#791e724500929cdfeb31395154d9a26fd27ffb46" From b1b14616f4e0703f8ac3038eedd03edfe5ece8af Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 25 May 2021 16:31:13 +0200 Subject: [PATCH 5/7] Add changelog --- changelog/unreleased/enhancement-copy-link-toasts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/enhancement-copy-link-toasts diff --git a/changelog/unreleased/enhancement-copy-link-toasts b/changelog/unreleased/enhancement-copy-link-toasts new file mode 100644 index 00000000000..dc86b0402d1 --- /dev/null +++ b/changelog/unreleased/enhancement-copy-link-toasts @@ -0,0 +1,5 @@ +Enhancement: Confirmation message when copying links + +We've added confirmation messages (toasts) when a private or public link is copied to the clipboard. + +https://github.com/owncloud/web/pull/5147 From 10978fec42654b589297c388113a9a529ba17eaf Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 25 May 2021 16:42:53 +0200 Subject: [PATCH 6/7] Remove unused computed prop --- .../src/components/PublicLinksSidebar/LinkInfo.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/web-app-files/src/components/PublicLinksSidebar/LinkInfo.vue b/packages/web-app-files/src/components/PublicLinksSidebar/LinkInfo.vue index 5f71b295887..04ec5c06a47 100644 --- a/packages/web-app-files/src/components/PublicLinksSidebar/LinkInfo.vue +++ b/packages/web-app-files/src/components/PublicLinksSidebar/LinkInfo.vue @@ -132,9 +132,6 @@ export default { copyToClipboardSuccessMsgTitle() { return this.$gettext('Public link copied') - }, - copyToClipboardSuccessMsgText() { - return this.$gettext('The public link has been copied to your clipboard.') } }, From a54ef61ee917f4d0e3175316ee095dbe837bc74f Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 25 May 2021 18:39:55 +0200 Subject: [PATCH 7/7] Add changelog for fixing ENTER for copy to clipboard buttons --- changelog/unreleased/bugfix-copy-to-clipboard-with-keyboard | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/bugfix-copy-to-clipboard-with-keyboard diff --git a/changelog/unreleased/bugfix-copy-to-clipboard-with-keyboard b/changelog/unreleased/bugfix-copy-to-clipboard-with-keyboard new file mode 100644 index 00000000000..ce2110e36cb --- /dev/null +++ b/changelog/unreleased/bugfix-copy-to-clipboard-with-keyboard @@ -0,0 +1,5 @@ +Bugfix: Keyboard navigation for copy to clipboard + +We've fixed that the buttons for copying (private/public) links to the clipboard were not usable via keyboard. + +https://github.com/owncloud/web/pull/5147