summaryrefslogtreecommitdiffstats
path: root/src/main.js
blob: 2289c04de7fb80f3381a35bd1ddf5923ca4ad4cf (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
41
42
43
44
import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import Explore from './components/Explore.vue'
import { generateUrl } from '@nextcloud/router'
import Vuex, { Store } from 'vuex'

import mainStore from './store/index.ts'

import { Tooltip } from '@nextcloud/vue'

Vue.prototype.t = t
Vue.prototype.n = n
Vue.prototype.OC = OC
Vue.prototype.OCA = OCA

Vue.use(Vuex)
Vue.use(VueRouter)

Vue.directive('tooltip', Tooltip)

const routes = [
	{
		name: 'explore',
		path: '#explore',
		component: Explore,
	},
]

const router = new VueRouter({
	mode: 'history',
	base: generateUrl('apps/news'),
	routes,
})

const store = new Store(mainStore)

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