rename frontend directory

This commit is contained in:
Shivering Ocelot committed 2025-07-14 16:41:41 -05:00
1 parent f870869d47
commit c8b86927e2
36 files changed
+4 -10

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
function objectView (name, mod) {
return {
name,
path: `/${name}/:id`,
props: true,
component: mod
}
}
// These routers must be handled by the server by rendering the index page
// file: backend/server.py
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: HomeView,
},
{
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (About.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import('../views/AboutView.vue'),
},
{
name: 'chat-create',
path: `/chat/create`,
component: () => import('../views/ChatCreate.vue')
},
{
name: 'agent-create',
path: `/agent/create`,
component: () => import('../views/AgentCreate.vue')
},
objectView('chat', () => import('../views/Chat.vue')),
objectView('agent', () => import('../views/Agent.vue')),
],
})
export default router