From 508999d5cb01246a69c2c979f08f370933cc4630 Mon Sep 17 00:00:00 2001 From: terwer Date: Wed, 24 May 2023 10:00:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B0=E5=A2=9E=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=EF=BC=8C=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E5=BF=85=E9=A1=BB=E6=B8=85=E9=99=A4=E4=B8=B4=E6=97=B6=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/en_US.json | 1 + src/i18n/zh_CN.json | 1 + src/lib/ImportForm.svelte | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index 134b5c7..042a436 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -29,5 +29,6 @@ "cleanTemp": "clean up temporary files", "clean": "Delete", "tempCount": "temporary files", + "tempCountExists": "Please clean up the temporary files before batch import", "supportedTypes": "Currently supported formats: .epub, .docx, .html, .opml" } \ No newline at end of file diff --git a/src/i18n/zh_CN.json b/src/i18n/zh_CN.json index ede849b..df9ec3c 100644 --- a/src/i18n/zh_CN.json +++ b/src/i18n/zh_CN.json @@ -29,5 +29,6 @@ "cleanTemp": "清理临时文件,共", "clean": "删除", "tempCount": "个临时文件", + "tempCountExists": "请先清理临时文件在进行批量导入", "supportedTypes": "目前支持的格式:.md, .epub, .docx, .html, .opml" } \ No newline at end of file diff --git a/src/lib/ImportForm.svelte b/src/lib/ImportForm.svelte index db90271..1f66a54 100644 --- a/src/lib/ImportForm.svelte +++ b/src/lib/ImportForm.svelte @@ -134,6 +134,12 @@ // 批量转换开始 // ================= const selectFolder = async () => { + // 批量导入之前先清空临时文件 + if (tempCount > 0) { + showMessage(`${pluginInstance.i18n.tempCountExists}`, 1000, "error") + return + } + const result = await window.showDirectoryPicker() dialog.destroy()