Skip to content

Commit

Permalink
fixup! fix(settings): drop local setting for background blur filter, …
Browse files Browse the repository at this point in the history
…use provided by server

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Jul 4, 2024
1 parent c5b2cfa commit a6e39f7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/SettingsDialog/SettingsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a6e39f7

Please sign in to comment.