diff options
author | Simon L <szaimen@e.mail.de> | 2022-12-03 19:55:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-03 19:55:16 +0100 |
commit | 31ec83f2d82544741cb16836de60fc92072efca8 (patch) | |
tree | 3fbe7f3318c42a6ee4d8c9d84f0659258b72ad09 /apps | |
parent | 82e2a9033fad4917538568e87e8dec8c38ba31df (diff) | |
parent | 7c943c5ce477afcec26bc0b8f25eb19c13963d74 (diff) | |
download | nextcloud-server-31ec83f2d82544741cb16836de60fc92072efca8.tar.gz nextcloud-server-31ec83f2d82544741cb16836de60fc92072efca8.zip |
Merge pull request #35271 from nextcloud/enh/a11y-share-success
Show success on share actions
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 4 | ||||
-rw-r--r-- | apps/files_sharing/src/mixins/SharesMixin.js | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index a736299b9d4..930bae849c2 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -300,7 +300,7 @@ <script> import { generateUrl } from '@nextcloud/router' -import { showError } from '@nextcloud/dialogs' +import { showError, showSuccess } from '@nextcloud/dialogs' import { Type as ShareTypes } from '@nextcloud/sharing' import Vue from 'vue' @@ -774,6 +774,7 @@ export default { if (typeof this.share.newLabel === 'string') { this.share.label = this.share.newLabel this.$delete(this.share, 'newLabel') + showSuccess(t('files_sharing', 'Share label saved')) this.queueUpdate('label') } }, @@ -840,6 +841,7 @@ export default { onPasswordSubmit() { if (this.hasUnsavedPassword) { this.share.password = this.share.newPassword.trim() + showSuccess(t('files_sharing', 'Share password saved')) this.queueUpdate('password') } }, diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index 68468d76de4..e5fb141e127 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -25,6 +25,7 @@ * */ +import { showSuccess } from '@nextcloud/dialogs' import { getCurrentUser } from '@nextcloud/auth' // eslint-disable-next-line import/no-unresolved, node/no-missing-import import PQueue from 'p-queue' @@ -211,6 +212,7 @@ export default { if (this.share.newNote) { this.share.note = this.share.newNote this.$delete(this.share, 'newNote') + showSuccess(t('files_sharing', 'Share note saved')) this.queueUpdate('note') } }, @@ -224,6 +226,10 @@ export default { this.open = false await this.deleteShare(this.share.id) console.debug('Share deleted', this.share.id) + const message = this.share.itemType === 'file' + ? t('files_sharing', 'File "{path}" has been unshared', { path: this.share.path }) + : t('files_sharing', 'Folder "{path}" has been unshared', { path: this.share.path }) + showSuccess(message) this.$emit('remove:share', this.share) } catch (error) { // re-open menu if error |