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-05-23 11:08:06 +02:00
|
|
|
|
2023-02-19 17:13:33 +01:00
|
|
|
import { createRouter, createWebHashHistory } from 'vue-router';
|
|
|
|
|
|
2024-08-23 19:17:23 +02:00
|
|
|
import i18n from './i18n.js';
|
2023-07-12 14:22:58 +02:00
|
|
|
import FileManager from './FileManager.vue';
|
2023-02-22 15:59:23 +01:00
|
|
|
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
|
|
|
});
|
|
|
|
|
|
2024-08-23 19:17:23 +02:00
|
|
|
(async function init() {
|
2023-07-12 14:22:58 +02:00
|
|
|
const app = createApp(FileManager);
|
2023-02-19 17:13:33 +01:00
|
|
|
|
2024-08-23 19:17:23 +02:00
|
|
|
app.use(await i18n());
|
2023-06-26 16:35:07 +02:00
|
|
|
app.use(router);
|
2023-02-19 17:13:33 +01:00
|
|
|
|
2023-06-26 16:35:07 +02:00
|
|
|
app.mount('#app');
|
|
|
|
|
})();
|