diff options
Diffstat (limited to 'apps/files_sharing/src/views/SharingDetailsTab.vue')
-rw-r--r-- | apps/files_sharing/src/views/SharingDetailsTab.vue | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 9922caf4f4e..ec33e0ec8aa 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -245,6 +245,7 @@ </template> <script> +import { emit } from '@nextcloud/event-bus' import { getLanguage } from '@nextcloud/l10n' import { Type as ShareType } from '@nextcloud/sharing' @@ -276,6 +277,7 @@ import Share from '../models/Share.js' import ShareRequests from '../mixins/ShareRequests.js' import ShareTypes from '../mixins/ShareTypes.js' import SharesMixin from '../mixins/SharesMixin.js' +import logger from '../services/logger.ts' import { ATOMIC_PERMISSIONS, @@ -887,7 +889,7 @@ export default { } this.creating = true - const share = await this.addShare(incomingShare, this.fileInfo) + const share = await this.addShare(incomingShare) this.creating = false this.share = share this.$emit('add:share', this.share) @@ -896,6 +898,9 @@ export default { this.queueUpdate(...permissionsAndAttributes) } + await this.getNode() + emit('files:node:updated', this.node) + if (this.$refs.externalLinkActions?.length > 0) { await Promise.allSettled(this.$refs.externalLinkActions.map((action) => { if (typeof action.$children.at(0)?.onSave !== 'function') { @@ -911,12 +916,11 @@ export default { * Process the new share request * * @param {Share} share incoming share object - * @param {object} fileInfo file data */ - async addShare(share, fileInfo) { + async addShare(share) { console.debug('Adding a new share from the input for', share) + const path = this.path try { - const path = (fileInfo.path + '/' + fileInfo.name).replace('//', '/') const resultingShare = await this.createShare({ path, shareType: share.shareType, @@ -936,6 +940,8 @@ export default { }, async removeShare() { await this.onDelete() + await this.getNode() + emit('files:node:updated', this.node) this.$emit('close-sharing-details') }, /** |