summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-11-18 20:33:59 +0000
committerChristopher Ng <chrng8@gmail.com>2022-12-03 01:09:27 +0000
commit7c943c5ce477afcec26bc0b8f25eb19c13963d74 (patch)
tree08ca1ad4501f43dc911d06760ef98f222929e415 /apps
parent835f0ae4decbcdae4ed7439bffd53fcdb0ee9614 (diff)
downloadnextcloud-server-7c943c5ce477afcec26bc0b8f25eb19c13963d74.tar.gz
nextcloud-server-7c943c5ce477afcec26bc0b8f25eb19c13963d74.zip
Show success on share actions
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/src/components/SharingEntryLink.vue4
-rw-r--r--apps/files_sharing/src/mixins/SharesMixin.js6
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