diff --git a/web/src/assets/logo.png b/web/src/assets/logo.png index 1ff03a1..152bece 100644 Binary files a/web/src/assets/logo.png and b/web/src/assets/logo.png differ diff --git a/web/src/components/Layout.vue b/web/src/components/Layout.vue index f49e25a..93e9f2a 100644 --- a/web/src/components/Layout.vue +++ b/web/src/components/Layout.vue @@ -10,7 +10,7 @@ import NavBar from "@/components/NavBar.vue";
- +

GPT Load

@@ -75,8 +75,11 @@ import NavBar from "@/components/NavBar.vue"; display: flex; align-items: center; justify-content: center; - width: 40px; - height: 40px; + width: 35px; + height: 35px; + img { + height: 100%; + } } .brand-title { diff --git a/web/src/components/keys/GroupFormModal.vue b/web/src/components/keys/GroupFormModal.vue index 3cc940f..0777faf 100644 --- a/web/src/components/keys/GroupFormModal.vue +++ b/web/src/components/keys/GroupFormModal.vue @@ -75,6 +75,11 @@ const rules: FormRules = { message: "请输入分组名称", trigger: ["blur", "input"], }, + { + pattern: /^[a-z]+$/, + message: "只能输入小写字母", + trigger: ["blur", "input"], + }, ], channel_type: [ { @@ -214,6 +219,10 @@ function handleClose() { // 提交表单 async function handleSubmit() { + if (loading.value) { + return; + } + try { await formRef.value?.validate(); @@ -306,17 +315,6 @@ async function handleSubmit() { - - - - + + + +
diff --git a/web/src/components/keys/GroupInfoCard.vue b/web/src/components/keys/GroupInfoCard.vue index 36bd2b3..13eb1d1 100644 --- a/web/src/components/keys/GroupInfoCard.vue +++ b/web/src/components/keys/GroupInfoCard.vue @@ -36,6 +36,8 @@ const stats = ref(null); const loading = ref(false); const dialog = useDialog(); const showEditModal = ref(false); +const delLoading = ref(false); +const expandedName = ref([]); onMounted(() => { loadStats(); @@ -44,6 +46,7 @@ onMounted(() => { watch( () => props.group, () => { + resetPage(); loadStats(); } ); @@ -76,16 +79,19 @@ function handleGroupEdited(newGroup: Group) { } async function handleDelete() { - if (!props.group) { + if (!props.group || delLoading.value) { return; } - dialog.warning({ + const d = dialog.warning({ title: "删除分组", content: `确定要删除分组 "${getGroupDisplayName(props.group)}" 吗?此操作不可恢复。`, positiveText: "确定", negativeText: "取消", onPositiveClick: async () => { + d.loading = true; + delLoading.value = true; + try { if (props.group?.id) { await keysApi.deleteGroup(props.group.id); @@ -93,6 +99,9 @@ async function handleDelete() { } } catch (error) { console.error("删除分组失败:", error); + } finally { + d.loading = false; + delLoading.value = false; } }, }); @@ -122,6 +131,11 @@ function copyUrl(url: string) { window.$message.error("复制失败"); }); } + +function resetPage() { + showEditModal.value = false; + expandedName.value = []; +}