feat(web): add API client, router, and app layout
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
41
web/src/router/index.ts
Normal file
41
web/src/router/index.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/jobs',
|
||||
},
|
||||
{
|
||||
path: '/jobs',
|
||||
name: 'JobsList',
|
||||
component: () => import('@/views/Jobs/List.vue'),
|
||||
meta: { title: '任务列表' },
|
||||
},
|
||||
{
|
||||
path: '/jobs/history',
|
||||
name: 'JobsHistory',
|
||||
component: () => import('@/views/Jobs/History.vue'),
|
||||
meta: { title: '任务历史' },
|
||||
},
|
||||
{
|
||||
path: '/jobs/submit',
|
||||
name: 'JobsSubmit',
|
||||
component: () => import('@/views/Jobs/Submit.vue'),
|
||||
meta: { title: '提交任务' },
|
||||
},
|
||||
{
|
||||
path: '/jobs/:id',
|
||||
name: 'JobsDetail',
|
||||
component: () => import('@/views/Jobs/Detail.vue'),
|
||||
meta: { title: '任务详情' },
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
redirect: '/jobs',
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user