aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/main-apps-users-management.ts
blob: 62ea009de11e588d25d753148cd624bf0c216634 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
 * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

import Vue from 'vue'
import Vuex from 'vuex'
import VTooltipPlugin from 'v-tooltip'
import { sync } from 'vuex-router-sync'
import { t, n } from '@nextcloud/l10n'

import SettingsApp from './views/SettingsApp.vue'
import router from './router/index.ts'
import { useStore } from './store/index.js'
import { getCSPNonce } from '@nextcloud/auth'
import { PiniaVuePlugin, createPinia } from 'pinia'

// CSP config for webpack dynamic chunk loading
// eslint-disable-next-line camelcase
__webpack_nonce__ = getCSPNonce()

// bind to window
Vue.prototype.t = t
Vue.prototype.n = n
Vue.use(PiniaVuePlugin)
Vue.use(VTooltipPlugin, { defaultHtml: false })
Vue.use(Vuex)

const store = useStore()
sync(store, router)

const pinia = createPinia()

export default new Vue({
	router,
	store,
	pinia,
	render: h => h(SettingsApp),
	el: '#content',
})