From 561f59073c8dc1035f3f2d44e5e51323e1a00984 Mon Sep 17 00:00:00 2001 From: zaeyee Date: Wed, 18 Sep 2024 12:01:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A8=E5=8D=95=E7=AE=80=E5=8D=95?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index a434787..ba6bd17 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,6 +9,12 @@ const email = ref('') async function genPrivateKey() { try { + if (!merchantId.value) { + return message('Please enter your merchant id', 'PHIZ - Tips') + } + if (!email.value) { + return message('Please enter your email', 'PHIZ - Tips') + } const savePath = await open({ title: 'Select a directory to save', defaultPath: await downloadDir(), @@ -16,12 +22,12 @@ async function genPrivateKey() { recursive: true }) if (!savePath) { - return message('Please select a directory to save') + return message('Please select a directory to save', 'PHIZ - Tips') } await invoke('gen_rsa_pair', { merchantId: merchantId.value, email: email.value, savePath }) - message('Successfully generated', 'Success') + message('Successfully generated', 'PHIZ - Success') } catch { - message('Generation failed', 'Error') + message('Generation failed', 'PHIZ - Error') } }