From f2e22a08faaaa4698e03cd6a36e095f102022b7d Mon Sep 17 00:00:00 2001 From: tbphp Date: Fri, 4 Jul 2025 18:26:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20web=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/assets/style.css | 12 +- web/src/components/Layout.vue | 5 +- web/src/components/keys/GroupInfoCard.vue | 14 +- web/src/components/keys/GroupList.vue | 2 +- web/src/components/keys/KeyTable.vue | 237 ++++++++++++++-------- web/src/views/Dashboard.vue | 4 +- web/src/views/Keys.vue | 14 +- web/src/views/Settings.vue | 16 +- 8 files changed, 181 insertions(+), 123 deletions(-) diff --git a/web/src/assets/style.css b/web/src/assets/style.css index 7b1372b..6cca491 100644 --- a/web/src/assets/style.css +++ b/web/src/assets/style.css @@ -1,6 +1,6 @@ :root { - overflow-y: scroll; - scrollbar-gutter: stable; + /* overflow-y: scroll; + scrollbar-gutter: stable; */ font-family: "Inter", -apple-system, @@ -143,18 +143,18 @@ body { /* 美化滚动条 */ ::-webkit-scrollbar { - width: 8px; - height: 8px; + width: 2px; + height: 2px; } ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.05); - border-radius: 4px; + border-radius: 1px; } ::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - border-radius: 4px; + border-radius: 1px; } ::-webkit-scrollbar-thumb:hover { diff --git a/web/src/components/Layout.vue b/web/src/components/Layout.vue index 77b5060..97cea9f 100644 --- a/web/src/components/Layout.vue +++ b/web/src/components/Layout.vue @@ -123,8 +123,9 @@ import NavBar from "@/components/NavBar.vue"; .content-wrapper { max-width: 1400px; margin: 0 auto; - padding: 24px; - min-height: calc(100vh - 64px); + padding: 24px 12px; + height: calc(100vh - 64px); + overflow: auto; } /* 响应式设计 */ diff --git a/web/src/components/keys/GroupInfoCard.vue b/web/src/components/keys/GroupInfoCard.vue index ca4ef9e..b62fdcc 100644 --- a/web/src/components/keys/GroupInfoCard.vue +++ b/web/src/components/keys/GroupInfoCard.vue @@ -92,6 +92,12 @@ function formatPercentage(num: number): string {
{{ stats.active_keys }}/{{ stats.total_keys }}
密钥数量
+
+
+ {{ formatPercentage(stats.failure_rate_24h) }} +
+
失败率
+
{{ formatNumber(stats.requests_1h) }}
近1小时
@@ -101,10 +107,8 @@ function formatPercentage(num: number): string {
近24小时
-
- {{ formatPercentage(stats.failure_rate_24h) }} -
-
失败率
+
{{ formatNumber(stats.requests_7d) }}
+
近7天
@@ -304,7 +308,7 @@ function formatPercentage(num: number): string { .stats-grid { display: grid; - grid-template-columns: repeat(4, 1fr); + grid-template-columns: repeat(5, 1fr); gap: 12px; } diff --git a/web/src/components/keys/GroupList.vue b/web/src/components/keys/GroupList.vue index 3d03a4e..5b429fd 100644 --- a/web/src/components/keys/GroupList.vue +++ b/web/src/components/keys/GroupList.vue @@ -232,7 +232,7 @@ async function createDemoGroup() { .group-name { font-weight: 600; - font-size: 12px; + font-size: 14px; line-height: 1.2; margin-bottom: 2px; overflow: hidden; diff --git a/web/src/components/keys/KeyTable.vue b/web/src/components/keys/KeyTable.vue index ee8e7db..aa3e36c 100644 --- a/web/src/components/keys/KeyTable.vue +++ b/web/src/components/keys/KeyTable.vue @@ -1,6 +1,7 @@