39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
import { createApp } from 'vue'
|
|
import './style.css'
|
|
import App from './App.vue'
|
|
import Login from './components/Login.vue';
|
|
import User from './components/user.vue';
|
|
import Dashboard from './components/Dashboard.vue';
|
|
import Logs from './components/dashboard/Logs.vue';
|
|
import Actions from './components/dashboard/actions.vue';
|
|
import Users from './components/dashboard/users.vue';
|
|
import Support from './components/dashboard/support.vue';
|
|
import Settings from './components/dashboard/settings.vue';
|
|
|
|
import Home from './components/Home.vue';
|
|
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
|
|
|
const router = createRouter({
|
|
// 4. Provide the history implementation to use. We are using the hash history for simplicity here.
|
|
history: createWebHistory(),
|
|
routes: [
|
|
{ path: '/', component: Home },
|
|
{ path: '/dash', component: Dashboard },
|
|
{ path: '/settings', component: User },
|
|
{ path: '/dash/logs', component: Logs },
|
|
{ path: '/dash/actions', component: Actions },
|
|
{ path: '/dash/users', component: Users },
|
|
{ path: '/dash/support', component: Support },
|
|
{ path: '/dash/serversettings', component: Settings },
|
|
{ path: '/login', component: Login },
|
|
],
|
|
})
|
|
|
|
// 5. Create and mount the root instance.
|
|
const app = createApp(App)
|
|
// Make sure to _use_ the router instance to make the
|
|
// whole app router-aware.
|
|
app.use(router)
|
|
|
|
app.mount('#app') |