mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 16:39:59 -04:00
Enable all files versions features when groupfolders is enabled
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
fc7944fc73
commit
eb71ee950d
4 changed files with 17 additions and 9 deletions
|
|
@ -44,13 +44,11 @@ class Capabilities implements ICapability {
|
|||
* Return this classes capabilities
|
||||
*/
|
||||
public function getCapabilities() {
|
||||
$groupFolderInstalled = $this->appManager->isInstalled('groupfolders');
|
||||
|
||||
return [
|
||||
'files' => [
|
||||
'versioning' => true,
|
||||
'version_labeling' => !$groupFolderInstalled && $this->config->getSystemValueBool('enable_version_labeling', true),
|
||||
'version_deletion' => !$groupFolderInstalled && $this->config->getSystemValueBool('enable_version_deletion', true),
|
||||
'version_labeling' => $this->config->getSystemValueBool('enable_version_labeling', true),
|
||||
'version_deletion' => $this->config->getSystemValueBool('enable_version_deletion', true),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -250,6 +250,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() {
|
||||
|
|
|
|||
4
dist/files_versions-files_versions.js
vendored
4
dist/files_versions-files_versions.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_versions-files_versions.js.map
vendored
2
dist/files_versions-files_versions.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue