mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
feat(insight): add cross-chat time investment
This commit is contained in:
1 parent
af7c8a5573
commit
8e90434032
49 files changed
+2406
-64
No files matched your search
@@ -102,7 +102,7 @@ onMounted(() => {
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<Sidebar v-if="shouldShowSidebar" :backend-features="false" settings-enabled />
|
||||
<Sidebar v-if="shouldShowSidebar" :backend-features="false" insight-enabled settings-enabled />
|
||||
<main class="relative flex-1 overflow-hidden">
|
||||
<router-view v-slot="{ Component }">
|
||||
<Transition name="page-fade" mode="out-in">
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Run: pnpm test -- apps/web-wasm/src/routes.test.ts
|
||||
*/
|
||||
|
||||
import assert from 'node:assert/strict'
|
||||
import test from 'node:test'
|
||||
import { webWasmRoutes } from './routes'
|
||||
|
||||
test('registers time investment as the Web WASM insight route', () => {
|
||||
const insightRoute = webWasmRoutes.find((route) => route.path === '/insight')
|
||||
|
||||
assert.ok(insightRoute)
|
||||
assert.deepEqual(insightRoute.redirect, { name: 'insight-time-investment' })
|
||||
assert.deepEqual(
|
||||
insightRoute.children?.map((route) => ({ path: route.path, name: route.name })),
|
||||
[{ path: 'time-investment', name: 'insight-time-investment' }]
|
||||
)
|
||||
})
|
||||
@@ -16,4 +16,16 @@ export const webWasmRoutes: RouteRecordRaw[] = [
|
||||
name: 'private-chat',
|
||||
component: () => import('./pages/SessionDetailPage.vue'),
|
||||
},
|
||||
{
|
||||
path: '/insight',
|
||||
component: () => import('@/pages/insight/index.vue'),
|
||||
redirect: { name: 'insight-time-investment' },
|
||||
children: [
|
||||
{
|
||||
path: 'time-investment',
|
||||
name: 'insight-time-investment',
|
||||
component: () => import('@/pages/insight/time-investment/index.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
Reference in new issue
Block a user