From 3f9439b11fa0e32233845e9cbc99698953256a84 Mon Sep 17 00:00:00 2001 From: tbphp Date: Fri, 4 Jul 2025 22:46:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/App.vue | 16 ----- web/src/assets/style.css | 4 +- web/src/components/BaseInfoCard.vue | 2 +- web/src/components/Layout.vue | 4 +- web/src/components/keys/GroupInfoCard.vue | 81 +++++++++++++++++------ web/src/components/keys/GroupList.vue | 2 +- web/src/components/keys/KeyTable.vue | 11 +-- web/src/types/models.ts | 2 +- web/src/views/Keys.vue | 12 +--- web/src/views/Settings.vue | 29 ++------ 10 files changed, 81 insertions(+), 82 deletions(-) diff --git a/web/src/App.vue b/web/src/App.vue index d16eb16..2fe484d 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -24,22 +24,6 @@ const isLoggedIn = computed(() => !!authKey.value); diff --git a/web/src/assets/style.css b/web/src/assets/style.css index 6cca491..f5091b5 100644 --- a/web/src/assets/style.css +++ b/web/src/assets/style.css @@ -143,8 +143,8 @@ body { /* 美化滚动条 */ ::-webkit-scrollbar { - width: 2px; - height: 2px; + width: 6px; + height: 6px; } ::-webkit-scrollbar-track { diff --git a/web/src/components/BaseInfoCard.vue b/web/src/components/BaseInfoCard.vue index 1d932f4..c236cc7 100644 --- a/web/src/components/BaseInfoCard.vue +++ b/web/src/components/BaseInfoCard.vue @@ -58,7 +58,7 @@ onMounted(() => {
diff --git a/web/src/components/Layout.vue b/web/src/components/Layout.vue index 97cea9f..e97ed8a 100644 --- a/web/src/components/Layout.vue +++ b/web/src/components/Layout.vue @@ -121,11 +121,9 @@ import NavBar from "@/components/NavBar.vue"; } .content-wrapper { - max-width: 1400px; + width: 1400px; margin: 0 auto; 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 f22f259..c6c7f85 100644 --- a/web/src/components/keys/GroupInfoCard.vue +++ b/web/src/components/keys/GroupInfoCard.vue @@ -17,7 +17,7 @@ import { import { onMounted, ref, watch } from "vue"; interface Props { - group: Group; + group: Group | null; } const props = defineProps(); @@ -38,6 +38,11 @@ watch( ); async function loadStats() { + if (!props.group) { + stats.value = null; + return; + } + try { loading.value = true; stats.value = await keysApi.getGroupStats(props.group.id); @@ -69,6 +74,17 @@ function formatNumber(num: number): string { function formatPercentage(num: number): string { return `${num.toFixed(1)}%`; } + +function copyUrl(url: string) { + navigator.clipboard + .writeText(url) + .then(() => { + window.$message.success("地址已复制到剪贴板"); + }) + .catch(() => { + window.$message.error("复制失败"); + }); +}