diff options
-rw-r--r-- | src/components/SettingsDialog/SettingsDialog.vue | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/SettingsDialog/SettingsDialog.vue b/src/components/SettingsDialog/SettingsDialog.vue index c75e22b62..592838d9d 100644 --- a/src/components/SettingsDialog/SettingsDialog.vue +++ b/src/components/SettingsDialog/SettingsDialog.vue @@ -170,12 +170,13 @@ </template> <script> +import axios from '@nextcloud/axios' import { showError, showSuccess } from '@nextcloud/dialogs' import { FilePickerVue } from '@nextcloud/dialogs/filepicker.js' import { subscribe, unsubscribe } from '@nextcloud/event-bus' import { loadState } from '@nextcloud/initial-state' import { t } from '@nextcloud/l10n' -import { generateUrl } from '@nextcloud/router' +import { generateOcsUrl, generateUrl } from '@nextcloud/router' import NcAppSettingsDialog from '@nextcloud/vue/dist/Components/NcAppSettingsDialog.js' import NcAppSettingsSection from '@nextcloud/vue/dist/Components/NcAppSettingsSection.js' @@ -185,6 +186,7 @@ import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadi import MediaDevicesPreview from './MediaDevicesPreview.vue' import { PRIVACY } from '../../constants.js' +import BrowserStorage from '../../services/BrowserStorage.js' import { getTalkConfig } from '../../services/CapabilitiesManager.ts' import { useSettingsStore } from '../../stores/settings.js' @@ -273,6 +275,16 @@ export default { }, }, + created() { + const blurred = BrowserStorage.getItem('background-blurred') + if (blurred === 'false' && isBackgroundBlurred === '') { + console.debug('Blur was disabled intentionally, propagating last choice to server') + axios.post(generateOcsUrl('apps/provisioning_api/api/v1/config/users/theming/force_enable_blur_filter'), + { configValue: 'no' }) + } + BrowserStorage.removeItem('background-blurred') + }, + mounted() { subscribe('show-settings', this.handleShowSettings) this.attachmentFolderLoading = false |