summaryrefslogtreecommitdiffstats
path: root/apps/files/src/main.js
blob: 948e1b68acaed395444cdd6d2796368c45e4b3a3 (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
import './files-app-settings.js'
import './templates.js'
import './legacy/filelistSearch.js'
import processLegacyFilesViews from './legacy/navigationMapper.js'

import Vue from 'vue'
import NavigationService from './services/Navigation.ts'
import NavigationView from './views/Navigation.vue'

import router from './router/router.js'

// Init Files App Navigation Service
const Navigation = new NavigationService()

// Assign Navigation Service to the global OCP.Files
window.OCP.Files = window.OCP.Files ?? {}
Object.assign(window.OCP.Files, { Navigation })

// Init Navigation View
const View = Vue.extend(NavigationView)
const FilesNavigationRoot = new View({
	name: 'FilesNavigationRoot',
	propsData: {
		Navigation,
	},
	router,
})
FilesNavigationRoot.$mount('#app-navigation-files')

// Init legacy files views
processLegacyFilesViews()