Files
cloudron-box/frontend/src/filemanager.js
T

34 lines
819 B
JavaScript
Raw Normal View History

2023-02-19 17:13:33 +01:00
import { createApp } from 'vue';
2023-06-16 18:18:16 +02:00
2023-02-19 17:13:33 +01:00
import './style.css';
2023-07-14 14:48:43 +02:00
import '@fontsource/noto-sans';
2023-02-19 17:13:33 +01:00
import { createRouter, createWebHashHistory } from 'vue-router';
import i18n from './i18n.js';
2023-07-12 14:22:58 +02:00
import FileManager from './FileManager.vue';
import Home from './views/Home.vue';
2023-02-26 23:34:31 +01:00
import Viewer from './views/Viewer.vue';
2023-02-19 17:13:33 +01:00
const routes = [
2023-02-28 17:11:54 +01:00
{ path: '/', redirect: '/home' },
2023-04-11 16:29:58 +02:00
{ path: '/home/:type?/:resourceId?/:cwd*', component: Home },
2023-04-16 18:13:22 +02:00
{ path: '/viewer/:type/:resourceId/:filePath*', component: Viewer }
2023-02-19 17:13:33 +01:00
];
const router = createRouter({
// 4. Provide the history implementation to use. We are using the hash history for simplicity here.
history: createWebHashHistory(),
2023-02-26 15:00:16 +01:00
routes,
2023-02-19 17:13:33 +01:00
});
(async function init() {
2023-07-12 14:22:58 +02:00
const app = createApp(FileManager);
2023-02-19 17:13:33 +01:00
app.use(await i18n());
app.use(router);
2023-02-19 17:13:33 +01:00
app.mount('#app');
})();