Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,7 @@ export default {
return this.share.attributes.find(attr => attr.key === 'download')?.value || false
},
set(checked) {
// Find the 'download' attribute and update its value
const downloadAttr = this.share.attributes.find(attr => attr.key === 'download')
if (downloadAttr) {
downloadAttr.value = checked
}
this.setShareAttribute('permissions', 'download', checked)
},
},
/**
Expand Down Expand Up @@ -744,6 +740,30 @@ export default {
},

methods: {
/**
* Set a share attribute on the current share
* @param {string} scope The attribute scope
* @param {string} key The attribute key
* @param {boolean} value The value
*/
setShareAttribute(scope, key, value) {
if (!this.share.attributes) {
this.$set(this.share, 'attributes', [])
}

const attribute = this.share.attributes
.find((attr) => attr.scope === scope || attr.key === key)

if (attribute) {
attribute.value = value
} else {
this.share.attributes.push({
scope,
key,
value,
})
}
},
updateAtomicPermissions({
isReadChecked = this.hasRead,
isEditChecked = this.canEdit,
Expand Down
2 changes: 0 additions & 2 deletions dist/3821-3821.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/3821-3821.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/3821-3821.js.map.license

This file was deleted.

2 changes: 2 additions & 0 deletions dist/7248-7248.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/7248-7248.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/7248-7248.js.map.license
4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

Loading