Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[stable29] [stable30] fix: Create download attribute when toggling checkbox #52907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: stable29
Choose a base branch
Loading
from
Draft
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
fix(files_sharing): Create download attribute when toggling checkbo…
…x if missing

Previously, toggling the checkbox did not create the 'download' attribute if it was missing,

causing it to become unresponsive after a page reload. Now, setShareAttribute ensures the

attribute is updated or created correctly.

Signed-off-by: nfebe <fenn25.fn@gmail.com>

[skip ci]
  • Loading branch information
nfebe authored and backportbot[bot] committed May 16, 2025
commit 1cfdff72f069c68b0a42a2aeed51d86ebb82779a
24 changes: 24 additions & 0 deletions 24 apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.