2021-03-31 06:15:40 -04:00
|
|
|
/**
|
2024-06-03 04:23:34 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-03-31 06:15:40 -04:00
|
|
|
*/
|
2025-03-17 07:27:03 -04:00
|
|
|
import { getCSPNonce } from '@nextcloud/auth'
|
2019-10-03 11:08:39 -04:00
|
|
|
import { loadState } from '@nextcloud/initial-state'
|
2018-10-08 08:03:22 -04:00
|
|
|
import Vue from 'vue'
|
|
|
|
|
|
2018-10-15 06:01:42 -04:00
|
|
|
import AdminTwoFactor from './components/AdminTwoFactor.vue'
|
2025-01-25 08:04:35 -05:00
|
|
|
import EncryptionSettings from './components/Encryption/EncryptionSettings.vue'
|
2023-03-23 02:38:34 -04:00
|
|
|
import store from './store/admin-security.js'
|
2018-10-15 06:01:42 -04:00
|
|
|
|
2019-09-25 12:19:42 -04:00
|
|
|
// eslint-disable-next-line camelcase
|
2025-03-17 07:27:03 -04:00
|
|
|
__webpack_nonce__ = getCSPNonce()
|
2018-10-08 08:03:22 -04:00
|
|
|
|
2019-09-25 12:19:42 -04:00
|
|
|
Vue.prototype.t = t
|
2018-10-08 08:03:22 -04:00
|
|
|
|
2019-02-26 13:43:59 -05:00
|
|
|
// Not used here but required for legacy templates
|
2019-09-25 12:19:42 -04:00
|
|
|
window.OC = window.OC || {}
|
|
|
|
|
window.OC.Settings = window.OC.Settings || {}
|
2019-02-26 13:43:59 -05:00
|
|
|
|
2019-01-10 10:04:13 -05:00
|
|
|
store.replaceState(
|
2023-07-25 08:47:27 -04:00
|
|
|
loadState('settings', 'mandatory2FAState'),
|
2019-01-10 10:04:13 -05:00
|
|
|
)
|
|
|
|
|
|
2018-10-15 06:01:42 -04:00
|
|
|
const View = Vue.extend(AdminTwoFactor)
|
2019-01-10 10:04:13 -05:00
|
|
|
new View({
|
2019-11-13 07:05:10 -05:00
|
|
|
store,
|
2019-01-10 10:04:13 -05:00
|
|
|
}).$mount('#two-factor-auth-settings')
|
2022-05-19 18:13:06 -04:00
|
|
|
|
2025-01-25 08:04:35 -05:00
|
|
|
const EncryptionView = Vue.extend(EncryptionSettings)
|
2022-05-19 18:13:06 -04:00
|
|
|
new EncryptionView().$mount('#vue-admin-encryption')
|