repod/src/main.js

33 lines
837 B
JavaScript
Raw Normal View History

2023-07-07 16:38:53 +00:00
import Vuex, { Store } from 'vuex'
2023-07-03 15:30:09 +00:00
import { translate, translatePlural } from '@nextcloud/l10n'
2023-06-23 07:44:48 +00:00
import App from './App.vue'
2023-07-02 22:12:40 +00:00
import { Plugin } from 'vue-fragment'
2023-07-02 16:30:42 +00:00
import Vue from 'vue'
import { generateFilePath } from '@nextcloud/router'
2023-07-07 16:38:53 +00:00
import modules from './modules/index.js'
2023-07-02 16:30:42 +00:00
import router from './router.js'
2023-06-22 18:10:30 +00:00
// eslint-disable-next-line
__webpack_public_path__ = generateFilePath(appName, '', 'js/')
2023-07-03 15:30:09 +00:00
const t = (...args) => translate('repod', ...args)
const n = (...args) => translatePlural('repod', ...args)
2023-06-22 18:10:30 +00:00
Vue.mixin({ methods: { t, n } })
2023-07-02 22:12:40 +00:00
Vue.use(Plugin)
2023-07-07 16:38:53 +00:00
Vue.use(Vuex)
2023-07-03 14:57:35 +00:00
Vue.prototype.OC = window.OC
Vue.prototype.OCA = window.OCA
2023-07-04 15:43:58 +00:00
Vue.prototype.OCP = window.OCP
Vue.prototype.AppConfig = window.oc_appconfig
2023-06-22 18:10:30 +00:00
2023-07-07 16:38:53 +00:00
const store = new Store({ modules })
2023-06-22 18:10:30 +00:00
export default new Vue({
el: '#content',
2023-07-02 16:30:42 +00:00
router,
2023-07-07 16:38:53 +00:00
store,
2023-06-22 18:10:30 +00:00
render: h => h(App),
})