From d9e91bb41e9cc5f2612a852d7084ef8a96a5d724 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Thu, 2 Apr 2026 22:58:55 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E5=A4=8D=20Webchat=20?= =?UTF-8?q?=E6=B5=85=E8=89=B2=E6=A8=A1=E5=BC=8F=E5=AD=97=E4=BD=93=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E5=8F=8A=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E9=9D=A2=E6=9D=BF=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/src/components/chat/MessageList.vue | 4 +- dashboard/src/i18n/translations.ts | 6 + dashboard/src/router/MainRoutes.ts | 5 +- dashboard/src/stores/auth.ts | 1 - dashboard/src/views/stats/StatsPage.vue | 705 ++++++++++-------- 5 files changed, 409 insertions(+), 312 deletions(-) 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('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 @@