feat(chat): ChatTimeline 双栏化(左会话列表)+ 路由可选参 + badge 账号级入口

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-08 15:22:20 +08:00
parent 394bfa8a7c
commit 8f166a9c18
3 changed files with 128 additions and 75 deletions
+4 -4
View File
@@ -2,8 +2,8 @@ import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
// `/` redirects to `/customers`. Chat timeline params are path segments so the
// URL is shareable + survives refresh:
// /chat/:channel/:ownerId/:talkerId (1:1 DM)
// /group/:channel/:ownerId/:roomId (group chat — same component, room_id)
// /chat/:channel/:ownerId/:talkerId? (1:1 DM; talkerId optional → account-level)
// /group/:channel/:ownerId/:roomId? (group chat — same component, room_id)
const routes: RouteRecordRaw[] = [
{
path: '/',
@@ -58,7 +58,7 @@ const routes: RouteRecordRaw[] = [
meta: { title: '搜索' },
},
{
path: '/chat/:channel/:ownerId/:talkerId',
path: '/chat/:channel/:ownerId/:talkerId?',
name: 'chat',
component: () => import('@/views/ChatTimeline.vue'),
props: true,
@@ -67,7 +67,7 @@ const routes: RouteRecordRaw[] = [
{
// Group chat timeline — same component, but with a `roomId` prop so it
// issues a room_id query instead of a talker_id query.
path: '/group/:channel/:ownerId/:roomId',
path: '/group/:channel/:ownerId/:roomId?',
name: 'group-chat',
component: () => import('@/views/ChatTimeline.vue'),
props: true,