summaryrefslogtreecommitdiffstats
path: root/apps/files/src/components/FileEntry.vue
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-04-07 09:30:13 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-04-11 11:58:02 +0200
commit45f39d65fea0c00ea3b01f0593422d97e791ff16 (patch)
tree306bace300249b7dd97c45fd6ec2e31cdee3652c /apps/files/src/components/FileEntry.vue
parent441aab68a4bbc1e2b88831ccb0f885cd80b7dd1a (diff)
downloadnextcloud-server-45f39d65fea0c00ea3b01f0593422d97e791ff16.tar.gz
nextcloud-server-45f39d65fea0c00ea3b01f0593422d97e791ff16.zip
fix(files): fix private variables and share loading marker between header and row
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/components/FileEntry.vue')
-rw-r--r--apps/files/src/components/FileEntry.vue6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue
index 130cd12367e..fca83cabbd1 100644
--- a/apps/files/src/components/FileEntry.vue
+++ b/apps/files/src/components/FileEntry.vue
@@ -63,6 +63,7 @@
<!-- Menu actions -->
<NcActions v-if="active"
ref="actionsMenu"
+ :disabled="source._loading"
:force-title="true"
:inline="enabledInlineActions.length">
<NcActionButton v-for="action in enabledMenuActions"
@@ -433,7 +434,10 @@ export default Vue.extend({
async onActionClick(action) {
const displayName = action.displayName([this.source], this.currentView)
try {
+ // Set the loading marker
this.loading = action.id
+ Vue.set(this.source, '_loading', true)
+
const success = await action.exec(this.source, this.currentView)
if (success) {
showSuccess(this.t('files', '"{displayName}" action executed successfully', { displayName }))
@@ -444,7 +448,9 @@ export default Vue.extend({
logger.error('Error while executing action', { action, e })
showError(this.t('files', '"{displayName}" action failed', { displayName }))
} finally {
+ // Reset the loading marker
this.loading = ''
+ Vue.set(this.source, '_loading', false)
}
},