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

36 lines
947 B
JavaScript
Raw Normal View History

2023-02-19 17:13:33 +01:00
import { createApp } from 'vue';
2025-08-05 16:39:57 +02:00
import '@fontsource/inter';
2023-02-19 17:13:33 +01:00
import { createRouter, createWebHashHistory } from 'vue-router';
2025-07-10 11:55:11 +02:00
import { tooltip } from '@cloudron/pankow';
import i18n from './i18n.js';
2024-10-04 21:37:17 +02:00
import FileManager from './components/FileManager.vue';
import FolderView from './components/FolderView.vue';
import FileViewer from './components/FileViewer.vue';
2025-08-05 16:39:57 +02:00
2025-03-19 17:13:58 +01:00
import './style.css';
2023-02-19 17:13:33 +01:00
const routes = [
2023-02-28 17:11:54 +01:00
{ path: '/', redirect: '/home' },
2024-10-04 21:37:17 +02:00
{ path: '/home/:type?/:resourceId?/:cwd*', component: FolderView },
{ path: '/viewer/:type/:resourceId/:filePath*', component: FileViewer }
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.directive('tooltip', tooltip);
app.use(await i18n());
app.use(router);
2023-02-19 17:13:33 +01:00
app.mount('#app');
})();