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:
dailz
2026-04-16 22:45:23 +08:00
parent 01a1119d13
commit 1356f91b9d
5 changed files with 132 additions and 0 deletions

41
web/src/router/index.ts Normal file
View 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