diff --git a/web/src/api/keys.ts b/web/src/api/keys.ts index a01e531..a08bc06 100644 --- a/web/src/api/keys.ts +++ b/web/src/api/keys.ts @@ -82,10 +82,16 @@ export const keysApi = { error: string; }[] > { - const res = await http.post("/keys/test-multiple", { - group_id, - keys_text, - }); + const res = await http.post( + "/keys/test-multiple", + { + group_id, + keys_text, + }, + { + hideMessage: true, + } + ); return res.data; }, @@ -97,6 +103,14 @@ export const keysApi = { }); }, + // 测试密钥 + restoreKeys(group_id: number, keys_text: string): Promise { + return http.post("/keys/restore-multiple", { + group_id, + keys_text, + }); + }, + // 恢复所有无效密钥 restoreAllInvalidKeys(group_id: number): Promise { return http.post("/keys/restore-all-invalid", { group_id }); diff --git a/web/src/components/keys/GroupInfoCard.vue b/web/src/components/keys/GroupInfoCard.vue index 8e85c9d..0ad4895 100644 --- a/web/src/components/keys/GroupInfoCard.vue +++ b/web/src/components/keys/GroupInfoCard.vue @@ -75,7 +75,7 @@ function handleGroupEdited(newGroup: Group) { } } -function handleDelete() { +async function handleDelete() { if (!props.group) { return; } diff --git a/web/src/components/keys/KeyCreateDialog.vue b/web/src/components/keys/KeyCreateDialog.vue new file mode 100644 index 0000000..b6b6653 --- /dev/null +++ b/web/src/components/keys/KeyCreateDialog.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/web/src/components/keys/KeyTable.vue b/web/src/components/keys/KeyTable.vue index 31fca12..feabb2d 100644 --- a/web/src/components/keys/KeyTable.vue +++ b/web/src/components/keys/KeyTable.vue @@ -1,6 +1,7 @@