diff --git a/dashboard/src/components/chat/MessageList.vue b/dashboard/src/components/chat/MessageList.vue index 8cbe70ead..13d937513 100644 --- a/dashboard/src/components/chat/MessageList.vue +++ b/dashboard/src/components/chat/MessageList.vue @@ -30,7 +30,6 @@ :class="{ 'has-audio': hasAudio(msg.content.message) }" :style="{ backgroundColor: 'var(--v-theme-chatMessageBubble)', - color: '#E2E2E7 !important', }" > @@ -185,7 +184,6 @@ class="message-bubble bot-bubble" :style="{ backgroundColor: 'var(--v-theme-chatAssistantBubble)', - color: '#E2E2E7 !important', }" > @@ -1623,7 +1621,7 @@ export default { /* Bubble text: hardcoded for debugging - #E2E2E7 = BlueBusinessDark primaryText */ .bubble-text { - color: #E2E2E7 !important; + color: inherit; } /* Stats Menu 样式 */ diff --git a/dashboard/src/i18n/translations.ts b/dashboard/src/i18n/translations.ts index 1689c125f..c1635fec8 100644 --- a/dashboard/src/i18n/translations.ts +++ b/dashboard/src/i18n/translations.ts @@ -36,6 +36,7 @@ import zhCNPersona from "./locales/zh-CN/features/persona.json"; import zhCNMigration from "./locales/zh-CN/features/migration.json"; import zhCNCommand from "./locales/zh-CN/features/command.json"; import zhCNSubagent from "./locales/zh-CN/features/subagent.json"; +import zhCNStats from "./locales/zh-CN/features/stats.json"; import zhCNWelcome from "./locales/zh-CN/features/welcome.json"; import zhCNErrors from "./locales/zh-CN/messages/errors.json"; @@ -77,6 +78,7 @@ import enUSPersona from "./locales/en-US/features/persona.json"; import enUSMigration from "./locales/en-US/features/migration.json"; import enUSCommand from "./locales/en-US/features/command.json"; import enUSSubagent from "./locales/en-US/features/subagent.json"; +import enUSStats from "./locales/en-US/features/stats.json"; import enUSWelcome from "./locales/en-US/features/welcome.json"; import enUSErrors from "./locales/en-US/messages/errors.json"; @@ -118,6 +120,7 @@ import ruRUPersona from "./locales/ru-RU/features/persona.json"; import ruRUMigration from "./locales/ru-RU/features/migration.json"; import ruRUCommand from "./locales/ru-RU/features/command.json"; import ruRUSubagent from "./locales/ru-RU/features/subagent.json"; +import ruRUStats from "./locales/ru-RU/features/stats.json"; import ruRUWelcome from "./locales/ru-RU/features/welcome.json"; import ruRUErrors from "./locales/ru-RU/messages/errors.json"; @@ -167,6 +170,7 @@ export const translations = { migration: zhCNMigration, command: zhCNCommand, subagent: zhCNSubagent, + stats: zhCNStats, welcome: zhCNWelcome, }, messages: { @@ -216,6 +220,7 @@ export const translations = { migration: enUSMigration, command: enUSCommand, subagent: enUSSubagent, + stats: enUSStats, welcome: enUSWelcome, }, messages: { @@ -265,6 +270,7 @@ export const translations = { migration: ruRUMigration, command: ruRUCommand, subagent: ruRUSubagent, + stats: ruRUStats, welcome: ruRUWelcome, }, messages: { diff --git a/dashboard/src/router/MainRoutes.ts b/dashboard/src/router/MainRoutes.ts index 1c2a7be7c..b31debdd6 100644 --- a/dashboard/src/router/MainRoutes.ts +++ b/dashboard/src/router/MainRoutes.ts @@ -52,10 +52,9 @@ const MainRoutes = { redirect: "/config#system", }, { - name: "Default", + name: "Stats", path: "/dashboard/default", - component: () => - import("@/views/dashboards/default/DefaultDashboard.vue"), + component: () => import("@/views/stats/StatsPage.vue"), }, { name: "Conversation", diff --git a/dashboard/src/stores/auth.ts b/dashboard/src/stores/auth.ts index 401f25548..bc693b30f 100644 --- a/dashboard/src/stores/auth.ts +++ b/dashboard/src/stores/auth.ts @@ -4,7 +4,6 @@ import axios from "@/utils/request"; export const useAuthStore = defineStore("auth", { state: () => ({ - // @ts-ignore username: "", returnUrl: null, }), diff --git a/dashboard/src/views/stats/StatsPage.vue b/dashboard/src/views/stats/StatsPage.vue index 502e3eb05..2205a75e5 100644 --- a/dashboard/src/views/stats/StatsPage.vue +++ b/dashboard/src/views/stats/StatsPage.vue @@ -3,9 +3,9 @@ - {{ t('header.eyebrow') }} - {{ t('header.title') }} - {{ t('header.subtitle') }} + {{ t("header.eyebrow") }} + {{ t("header.title") }} + {{ t("header.subtitle") }} @@ -15,12 +15,7 @@ - + {{ errorMessage }} @@ -46,8 +41,10 @@ - {{ t('messageOverview.title') }} - {{ t('messageOverview.subtitle') }} + {{ t("messageOverview.title") }} + + {{ t("messageOverview.subtitle") }} + - {{ t('messageTrend.title') }} - {{ t('messageTrend.subtitle', { range: rangeLabel }) }} + {{ t("messageTrend.title") }} + + {{ t("messageTrend.subtitle", { range: rangeLabel }) }} + - {{ t('messageTrend.totalMessages') }} - {{ formatNumber(baseStats?.message_count ?? 0) }} + {{ + t("messageTrend.totalMessages") + }} + {{ + formatNumber(baseStats?.message_count ?? 0) + }} @@ -88,8 +91,12 @@ - {{ t('platformRanking.title') }} - {{ t('platformRanking.subtitle', { range: rangeLabel }) }} + + {{ t("platformRanking.title") }} + + + {{ t("platformRanking.subtitle", { range: rangeLabel }) }} + @@ -102,23 +109,27 @@ {{ formatNumber(platform.count) }} - {{ t('empty.platformStats') }} + {{ t("empty.platformStats") }} - {{ t('modelCalls.title') }} - {{ t('modelCalls.subtitle') }} + {{ t("modelCalls.title") }} + {{ t("modelCalls.subtitle") }} - + - {{ t('modelTrend.title') }} - {{ t('modelTrend.subtitle') }} + {{ t("modelTrend.title") }} + + {{ t("modelTrend.subtitle") }} + - {{ t('modelTotal.title', { range: rangeLabel }) }} - {{ formatNumber(providerStats?.range_total_tokens ?? 0) }} {{ t('units.tokens') }} - {{ t('modelTotal.callCount', { count: formatNumber(providerStats?.range_total_calls ?? 0) }) }} + + {{ t("modelTotal.title", { range: rangeLabel }) }} + + + {{ formatNumber(providerStats?.range_total_tokens ?? 0) }} + {{ t("units.tokens") }} + + + {{ + t("modelTotal.callCount", { + count: formatNumber(providerStats?.range_total_calls ?? 0), + }) + }} + - {{ t('modelTotal.avgTtft') }} + {{ t("modelTotal.avgTtft") }} {{ rangeAvgTtftLabel }} - {{ t('modelTotal.avgDuration') }} + {{ t("modelTotal.avgDuration") }} {{ rangeAvgDurationLabel }} - {{ t('modelTotal.avgTpm') }} + {{ t("modelTotal.avgTpm") }} {{ rangeAvgTpmLabel }} - {{ t('modelTotal.successRate') }} + {{ t("modelTotal.successRate") }} {{ rangeSuccessRateLabel }} @@ -157,8 +179,12 @@ - {{ t('modelRanking.title', { range: rangeLabel }) }} - {{ t('modelRanking.subtitle') }} + + {{ t("modelRanking.title", { range: rangeLabel }) }} + + + {{ t("modelRanking.subtitle") }} + {{ formatNumber(provider.tokens) }} - {{ t('empty.modelCalls', { range: rangeLabel }) }} + + {{ t("empty.modelCalls", { range: rangeLabel }) }} + @@ -182,8 +210,12 @@ - {{ t('sessionRanking.title', { range: rangeLabel }) }} - {{ t('sessionRanking.subtitle') }} + + {{ t("sessionRanking.title", { range: rangeLabel }) }} + + + {{ t("sessionRanking.subtitle") }} + @@ -196,7 +228,9 @@ {{ formatNumber(item.tokens) }} - {{ t('empty.sessionCalls', { range: rangeLabel }) }} + + {{ t("empty.sessionCalls", { range: rangeLabel }) }} + @@ -204,90 +238,90 @@
{{ t('header.subtitle') }}
{{ t("header.subtitle") }}