repod/src/main.js
Michel Roux 1a9ae3c5c7
All checks were successful
repod / nextcloud (push) Successful in 55s
repod / nodejs (push) Successful in 1m55s
First component to use vuex
2023-07-07 18:38:53 +02:00

33 lines
837 B
JavaScript

import Vuex, { Store } from 'vuex'
import { translate, translatePlural } from '@nextcloud/l10n'
import App from './App.vue'
import { Plugin } from 'vue-fragment'
import Vue from 'vue'
import { generateFilePath } from '@nextcloud/router'
import modules from './modules/index.js'
import router from './router.js'
// eslint-disable-next-line
__webpack_public_path__ = generateFilePath(appName, '', 'js/')
const t = (...args) => translate('repod', ...args)
const n = (...args) => translatePlural('repod', ...args)
Vue.mixin({ methods: { t, n } })
Vue.use(Plugin)
Vue.use(Vuex)
Vue.prototype.OC = window.OC
Vue.prototype.OCA = window.OCA
Vue.prototype.OCP = window.OCP
Vue.prototype.AppConfig = window.oc_appconfig
const store = new Store({ modules })
export default new Vue({
el: '#content',
router,
store,
render: h => h(App),
})