From 7da793b9e0f05f5eb7fed6b7a7cb25827ca1ab1c Mon Sep 17 00:00:00 2001 From: digua Date: Tue, 16 Jun 2026 00:30:34 +0800 Subject: [PATCH] feat: add global insight page as top-level navigation entry --- src/components/common/Sidebar.vue | 27 ++++++++--- src/i18n/locales/en-US/index.ts | 2 + src/i18n/locales/en-US/insight.json | 9 ++++ src/i18n/locales/en-US/layout.json | 1 + src/i18n/locales/ja-JP/index.ts | 2 + src/i18n/locales/ja-JP/insight.json | 9 ++++ src/i18n/locales/ja-JP/layout.json | 1 + src/i18n/locales/zh-CN/index.ts | 2 + src/i18n/locales/zh-CN/insight.json | 9 ++++ src/i18n/locales/zh-CN/layout.json | 1 + src/i18n/locales/zh-TW/index.ts | 2 + src/i18n/locales/zh-TW/insight.json | 9 ++++ src/i18n/locales/zh-TW/layout.json | 1 + src/pages/insight/index.vue | 75 +++++++++++++++++++++++++++++ src/routes/index.ts | 5 ++ 15 files changed, 148 insertions(+), 7 deletions(-) create mode 100644 src/i18n/locales/en-US/insight.json create mode 100644 src/i18n/locales/ja-JP/insight.json create mode 100644 src/i18n/locales/zh-CN/insight.json create mode 100644 src/i18n/locales/zh-TW/insight.json create mode 100644 src/pages/insight/index.vue diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index 8049aff98..48ad69ae3 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -36,6 +36,9 @@ const route = useRoute() // 是否在首页 const isHomePage = computed(() => route.path === '/') +// 是否在洞察页 +const isInsightPage = computed(() => route.path === '/insight') + // 重命名相关状态 const showRenameModal = ref(false) const renameTarget = ref(null) @@ -431,13 +434,23 @@ function getAvatarColorClass(session: AnalysisSession, isActive: boolean) { - - +
+ + + + + +
diff --git a/src/i18n/locales/en-US/index.ts b/src/i18n/locales/en-US/index.ts index 3791422b0..40e1a9b44 100644 --- a/src/i18n/locales/en-US/index.ts +++ b/src/i18n/locales/en-US/index.ts @@ -11,6 +11,7 @@ import members from './members.json' import records from './records.json' import views from './views.json' import wordFilter from './wordFilter.json' +import insight from './insight.json' export default { common, @@ -26,4 +27,5 @@ export default { records, views, wordFilter, + insight, } diff --git a/src/i18n/locales/en-US/insight.json b/src/i18n/locales/en-US/insight.json new file mode 100644 index 000000000..4410fce7a --- /dev/null +++ b/src/i18n/locales/en-US/insight.json @@ -0,0 +1,9 @@ +{ + "title": "Insights", + "placeholder": "Global insights are coming soon, stay tuned", + "tabs": { + "overview": "Overview", + "trends": "Trends", + "ranking": "Ranking" + } +} diff --git a/src/i18n/locales/en-US/layout.json b/src/i18n/locales/en-US/layout.json index b6c8f9c0f..0e290ec96 100644 --- a/src/i18n/locales/en-US/layout.json +++ b/src/i18n/locales/en-US/layout.json @@ -1,6 +1,7 @@ { "brand": "ChatLab", "newAnalysis": "New Analysis", + "insight": "Insights", "tools": "Tools", "chatHistory": "Chat History", "manage": "Manage", diff --git a/src/i18n/locales/ja-JP/index.ts b/src/i18n/locales/ja-JP/index.ts index 3791422b0..40e1a9b44 100644 --- a/src/i18n/locales/ja-JP/index.ts +++ b/src/i18n/locales/ja-JP/index.ts @@ -11,6 +11,7 @@ import members from './members.json' import records from './records.json' import views from './views.json' import wordFilter from './wordFilter.json' +import insight from './insight.json' export default { common, @@ -26,4 +27,5 @@ export default { records, views, wordFilter, + insight, } diff --git a/src/i18n/locales/ja-JP/insight.json b/src/i18n/locales/ja-JP/insight.json new file mode 100644 index 000000000..57a8c5933 --- /dev/null +++ b/src/i18n/locales/ja-JP/insight.json @@ -0,0 +1,9 @@ +{ + "title": "インサイト", + "placeholder": "グローバルインサイト機能は近日公開予定です", + "tabs": { + "overview": "概要", + "trends": "トレンド", + "ranking": "ランキング" + } +} diff --git a/src/i18n/locales/ja-JP/layout.json b/src/i18n/locales/ja-JP/layout.json index 2028854b4..c503dd12c 100644 --- a/src/i18n/locales/ja-JP/layout.json +++ b/src/i18n/locales/ja-JP/layout.json @@ -1,6 +1,7 @@ { "brand": "ChatLab", "newAnalysis": "新しいチャットを分析", + "insight": "インサイト", "tools": "ツール", "chatHistory": "チャット履歴", "manage": "管理", diff --git a/src/i18n/locales/zh-CN/index.ts b/src/i18n/locales/zh-CN/index.ts index 3791422b0..40e1a9b44 100644 --- a/src/i18n/locales/zh-CN/index.ts +++ b/src/i18n/locales/zh-CN/index.ts @@ -11,6 +11,7 @@ import members from './members.json' import records from './records.json' import views from './views.json' import wordFilter from './wordFilter.json' +import insight from './insight.json' export default { common, @@ -26,4 +27,5 @@ export default { records, views, wordFilter, + insight, } diff --git a/src/i18n/locales/zh-CN/insight.json b/src/i18n/locales/zh-CN/insight.json new file mode 100644 index 000000000..c5580cf61 --- /dev/null +++ b/src/i18n/locales/zh-CN/insight.json @@ -0,0 +1,9 @@ +{ + "title": "洞察", + "placeholder": "全局洞察功能正在建设中,敬请期待", + "tabs": { + "overview": "总览", + "trends": "趋势", + "ranking": "排行" + } +} diff --git a/src/i18n/locales/zh-CN/layout.json b/src/i18n/locales/zh-CN/layout.json index b998eb1a3..60c63d44c 100644 --- a/src/i18n/locales/zh-CN/layout.json +++ b/src/i18n/locales/zh-CN/layout.json @@ -1,6 +1,7 @@ { "brand": "ChatLab", "newAnalysis": "分析新对话", + "insight": "洞察", "tools": "实用工具", "chatHistory": "聊天对话", "manage": "管理", diff --git a/src/i18n/locales/zh-TW/index.ts b/src/i18n/locales/zh-TW/index.ts index 3791422b0..40e1a9b44 100644 --- a/src/i18n/locales/zh-TW/index.ts +++ b/src/i18n/locales/zh-TW/index.ts @@ -11,6 +11,7 @@ import members from './members.json' import records from './records.json' import views from './views.json' import wordFilter from './wordFilter.json' +import insight from './insight.json' export default { common, @@ -26,4 +27,5 @@ export default { records, views, wordFilter, + insight, } diff --git a/src/i18n/locales/zh-TW/insight.json b/src/i18n/locales/zh-TW/insight.json new file mode 100644 index 000000000..da8864cae --- /dev/null +++ b/src/i18n/locales/zh-TW/insight.json @@ -0,0 +1,9 @@ +{ + "title": "洞察", + "placeholder": "全域洞察功能正在建設中,敬請期待", + "tabs": { + "overview": "總覽", + "trends": "趨勢", + "ranking": "排行" + } +} diff --git a/src/i18n/locales/zh-TW/layout.json b/src/i18n/locales/zh-TW/layout.json index 87ea13e9e..ab2c9315a 100644 --- a/src/i18n/locales/zh-TW/layout.json +++ b/src/i18n/locales/zh-TW/layout.json @@ -1,6 +1,7 @@ { "brand": "ChatLab", "newAnalysis": "分析新對話", + "insight": "洞察", "tools": "實用工具", "chatHistory": "聊天紀錄", "manage": "管理", diff --git a/src/pages/insight/index.vue b/src/pages/insight/index.vue new file mode 100644 index 000000000..379aef489 --- /dev/null +++ b/src/pages/insight/index.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/routes/index.ts b/src/routes/index.ts index e5732998e..921da20c3 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -25,6 +25,11 @@ export const router = createRouter({ name: 'private-chat', component: () => import('@/pages/private-chat/index.vue'), }, + { + path: '/insight', + name: 'insight', + component: () => import('@/pages/insight/index.vue'), + }, ], history: createWebHashHistory(), })