Merge pull request #56375 from nextcloud/backport/56042/stable31

[stable31] fix(files_external): check for changes when saving settings
pull/56403/head
Louis 2025-11-12 13:57:12 +07:00 committed by GitHub
commit f50d9d2bf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 6 deletions

@ -554,6 +554,8 @@ MountOptionsDropdown.prototype = {
this.setOptions(mountOptions, visibleOptions, storage)
this.$el.appendTo($container)
this._initialOptions = JSON.stringify(this.getOptions())
MountOptionsDropdown._last = this
this.$el.trigger('show')
@ -1455,11 +1457,14 @@ MountConfigListView.prototype = _.extend({
})
dropDown.$el.on('hide', function() {
const mountOptions = dropDown.getOptions()
const newOptions = dropDown.getOptions()
const newOptionsStr = JSON.stringify(newOptions)
$('body').off('mouseup.mountOptionsDropdown')
$tr.find('input.mountOptions').val(JSON.stringify(mountOptions))
$tr.find('td.mountOptionsToggle>.icon-more').attr('aria-expanded', 'false')
self.saveStorageConfig($tr)
if (dropDown._initialOptions !== newOptionsStr) {
$tr.find('input.mountOptions').val(newOptionsStr)
self.saveStorageConfig($tr)
}
})
},
}, OC.Backbone.Events)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long