summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/src
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2023-07-05 15:52:13 +0200
committerLouis Chemineau <louis@chmn.me>2023-07-10 11:51:14 +0200
commite7d543278297fd8b119f768e0d7a6d2fe48b7c88 (patch)
tree2d151770ea44e8d4ab09f6d4b0ec2940a2117110 /apps/files_versions/src
parent0a876e3ac8138dc8d4734a2491284798c300fdd6 (diff)
downloadnextcloud-server-e7d543278297fd8b119f768e0d7a6d2fe48b7c88.tar.gz
nextcloud-server-e7d543278297fd8b119f768e0d7a6d2fe48b7c88.zip
Enable all files versions features when groupfolders is enabled
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/files_versions/src')
-rw-r--r--apps/files_versions/src/components/Version.vue14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/files_versions/src/components/Version.vue b/apps/files_versions/src/components/Version.vue
index a801c6beac8..93dfb95b8b7 100644
--- a/apps/files_versions/src/components/Version.vue
+++ b/apps/files_versions/src/components/Version.vue
@@ -46,7 +46,7 @@
</div>
</template>
<template #actions>
- <NcActionButton v-if="capabilities.files.version_labeling === true"
+ <NcActionButton v-if="enableLabeling"
:close-after-click="true"
@click="openVersionLabelModal">
<template #icon>
@@ -70,7 +70,7 @@
</template>
{{ t('files_versions', 'Download version') }}
</NcActionLink>
- <NcActionButton v-if="!isCurrent && capabilities.files.version_deletion === true"
+ <NcActionButton v-if="!isCurrent && enableDeletion"
:close-after-click="true"
@click="deleteVersion">
<template #icon>
@@ -244,6 +244,16 @@ export default {
formattedDate() {
return moment(this.version.mtime).format('LLL')
},
+
+ /** @return {boolean} */
+ enableLabeling() {
+ return this.capabilities.files.version_labeling === true && this.fileInfo.mountType !== 'group'
+ },
+
+ /** @return {boolean} */
+ enableDeletion() {
+ return this.capabilities.files.version_deletion === true && this.fileInfo.mountType !== 'group'
+ }
},
methods: {
openVersionLabelModal() {