2023-02-19 17:13:33 +01:00
|
|
|
import { createApp } from 'vue';
|
|
|
|
|
import './style.css';
|
|
|
|
|
|
|
|
|
|
import 'primevue/resources/themes/saga-blue/theme.css';
|
|
|
|
|
import 'primevue/resources/primevue.min.css';
|
|
|
|
|
import 'primeicons/primeicons.css';
|
|
|
|
|
|
|
|
|
|
import PrimeVue from 'primevue/config';
|
2023-03-29 09:46:07 +02:00
|
|
|
import ConfirmationService from 'primevue/confirmationservice';
|
2023-02-19 17:13:33 +01:00
|
|
|
|
|
|
|
|
import { createRouter, createWebHashHistory } from 'vue-router';
|
|
|
|
|
|
|
|
|
|
import App from './App.vue';
|
2023-02-22 15:59:23 +01:00
|
|
|
import Login from './views/Login.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-11 12:14:47 +02:00
|
|
|
{ path: '/viewer/:type/:resourceId/:filePath*', component: Viewer },
|
2023-02-19 17:13:33 +01:00
|
|
|
{ path: '/login', component: Login },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
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
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const app = createApp(App);
|
|
|
|
|
|
|
|
|
|
app.use(router);
|
|
|
|
|
app.use(PrimeVue, { ripple: true });
|
2023-03-29 09:46:07 +02:00
|
|
|
app.use(ConfirmationService);
|
2023-02-19 17:13:33 +01:00
|
|
|
|
|
|
|
|
app.mount('#app');
|