From 67e925dad5c97471badd47c828f8392f94bddbd2 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Tue, 18 Feb 2025 15:21:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=97=E6=BC=8F=E7=BF=BB=E8=AF=91=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/en.ts | 4 +++- src/i18n/lang/zh-cn.ts | 4 +++- src/views/dialogue/dialogueView.vue | 8 ++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 60af04e..6a8ce9c 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -95,7 +95,9 @@ export default { submit: "Submit", report: "Report", reason_for_reporting: "Reason for Reporting", - enter_a_description_for_your_report:"Enter a description for your report." + enter_a_description_for_your_report:"Enter a description for your report.", + revoke:"Revoke", + refresh:"Refresh", }, Report:{ pornographic_content: "Pornographic content", diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 522e13b..fb480d4 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -95,7 +95,9 @@ export default { submit: "提交", report: "举报", reason_for_reporting: "选择举报类型", - enter_a_description_for_your_report: "请输入举报描述" + enter_a_description_for_your_report: "请输入举报描述", + revoke:"撤销", + refresh:"重新生成", }, Report: { pornographic_content: "低俗色情", diff --git a/src/views/dialogue/dialogueView.vue b/src/views/dialogue/dialogueView.vue index d9b16f1..a0e9f57 100644 --- a/src/views/dialogue/dialogueView.vue +++ b/src/views/dialogue/dialogueView.vue @@ -13,6 +13,7 @@ import { ElMessage } from 'element-plus'; import { watch } from 'vue'; import i18n from 'src/i18n' import { reactive } from 'vue'; +import { successMsg } from 'src/components/Message'; // 挂载全局事件 window.onHtmlEventDispatch = onHtmlEventDispatch as any; @@ -108,6 +109,12 @@ const updateApi = async() => { let action = 'update' await api.changeApiKey({action}); revoke.value = false; + await api.getApiKey(); + const [_, res] = await api.changeApiKey({ action }); + if (!_ && res) { + apikey.value = res.result.api_key; + } + } const revokeApi = async() => { @@ -130,6 +137,7 @@ const handleKnowledgeDialogClose = () => { const copy = () => { navigator.clipboard.writeText(apikey.value); + successMsg('复制成功'); } -- Gitee