2022-03-17 14:06:38 -04:00
|
|
|
/**
|
2024-06-03 04:23:34 -04:00
|
|
|
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2022-03-17 14:06:38 -04:00
|
|
|
*/
|
|
|
|
|
|
2024-08-13 11:54:47 -04:00
|
|
|
import { getCSPNonce } from '@nextcloud/auth'
|
2022-03-17 14:06:38 -04:00
|
|
|
import { loadState } from '@nextcloud/initial-state'
|
|
|
|
|
import { translate as t } from '@nextcloud/l10n'
|
2023-03-23 02:38:34 -04:00
|
|
|
import Vue from 'vue'
|
|
|
|
|
import BackgroundJob from './components/BasicSettings/BackgroundJob.vue'
|
|
|
|
|
import ProfileSettings from './components/BasicSettings/ProfileSettings.vue'
|
2024-02-19 16:17:39 -05:00
|
|
|
import logger from './logger.ts'
|
2022-03-17 14:06:38 -04:00
|
|
|
|
2024-08-13 11:54:47 -04:00
|
|
|
__webpack_nonce__ = getCSPNonce()
|
2022-03-17 14:06:38 -04:00
|
|
|
|
|
|
|
|
const profileEnabledGlobally = loadState('settings', 'profileEnabledGlobally', true)
|
|
|
|
|
|
|
|
|
|
Vue.mixin({
|
|
|
|
|
props: {
|
|
|
|
|
logger,
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
t,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
|
2022-05-16 18:52:16 -04:00
|
|
|
const BackgroundJobView = Vue.extend(BackgroundJob)
|
|
|
|
|
new BackgroundJobView().$mount('#vue-admin-background-job')
|
|
|
|
|
|
2022-03-17 14:06:38 -04:00
|
|
|
if (profileEnabledGlobally) {
|
|
|
|
|
const ProfileSettingsView = Vue.extend(ProfileSettings)
|
2022-05-16 18:52:16 -04:00
|
|
|
new ProfileSettingsView().$mount('#vue-admin-profile-settings')
|
2022-03-17 14:06:38 -04:00
|
|
|
}
|