aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorPytal <24800714+Pytal@users.noreply.github.com>2022-12-05 17:58:44 -0800
committerGitHub <noreply@github.com>2022-12-05 17:58:44 -0800
commitc38fded268ac2d819426784cb19001a2315bd183 (patch)
tree5eaaf7449ab9249245fb3590e4091ae02355906a /apps/files_sharing
parentbe0facaba478235ee5f0608e36bf806570298a18 (diff)
parent08e15308cbb2e0dd3beefe4707de603d0af047fc (diff)
downloadnextcloud-server-c38fded268ac2d819426784cb19001a2315bd183.tar.gz
nextcloud-server-c38fded268ac2d819426784cb19001a2315bd183.zip
Merge pull request #35437 from nextcloud/enh/a11y-share-copy-link
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/src/components/SharingEntryInternal.vue9
-rw-r--r--apps/files_sharing/src/components/SharingEntryLink.vue8
2 files changed, 11 insertions, 6 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryInternal.vue b/apps/files_sharing/src/components/SharingEntryInternal.vue
index 9912648357c..7ad5b35c49f 100644
--- a/apps/files_sharing/src/components/SharingEntryInternal.vue
+++ b/apps/files_sharing/src/components/SharingEntryInternal.vue
@@ -23,6 +23,7 @@
<script>
import { generateUrl } from '@nextcloud/router'
+import { showSuccess } from '@nextcloud/dialogs'
import { NcActionButton } from '@nextcloud/vue'
import SharingEntrySimple from './SharingEntrySimple'
@@ -71,9 +72,10 @@ export default {
*/
clipboardTooltip() {
if (this.copied) {
- return this.copySuccess
- ? t('files_sharing', 'Link copied')
- : t('files_sharing', 'Cannot copy, please copy the link manually')
+ if (this.copySuccess) {
+ return ''
+ }
+ return t('files_sharing', 'Cannot copy, please copy the link manually')
}
return t('files_sharing', 'Copy to clipboard')
},
@@ -90,6 +92,7 @@ export default {
async copyLink() {
try {
await this.$copyText(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()
this.copySuccess = true
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue
index 930bae849c2..9b60e34b194 100644
--- a/apps/files_sharing/src/components/SharingEntryLink.vue
+++ b/apps/files_sharing/src/components/SharingEntryLink.vue
@@ -572,9 +572,10 @@ export default {
*/
clipboardTooltip() {
if (this.copied) {
- return this.copySuccess
- ? t('files_sharing', 'Link copied')
- : t('files_sharing', 'Cannot copy, please copy the link manually')
+ if (this.copySuccess) {
+ return ''
+ }
+ return t('files_sharing', 'Cannot copy, please copy the link manually')
}
return t('files_sharing', 'Copy to clipboard')
},
@@ -781,6 +782,7 @@ export default {
async copyLink() {
try {
await this.$copyText(this.shareLink)
+ showSuccess(t('files_sharing', 'Link copied'))
// focus and show the tooltip
this.$refs.copyButton.$el.focus()
this.copySuccess = true