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') } }