diff --git a/packages/renderer/src/components/DownloadForm.tsx b/packages/renderer/src/components/DownloadForm.tsx index 24e6516a..e5c49aac 100644 --- a/packages/renderer/src/components/DownloadForm.tsx +++ b/packages/renderer/src/components/DownloadForm.tsx @@ -229,9 +229,13 @@ const DownloadForm = forwardRef( try { await form.validateFields(); const values = form.getFieldsValue(); - const close = await onAddToList(values); - if (close) { - setModalOpen(false); + try { + const close = await onAddToList(values); + if (close) { + setModalOpen(false); + } + } catch (error) { + messageApi.error(t("pleaseEnterCorrectFomeInfo")); } } catch (e: any) { messageApi.error(e?.message); @@ -247,12 +251,16 @@ const DownloadForm = forwardRef( try { await form.validateFields(); const values = form.getFieldsValue(); - const close = await onDownloadNow(values); - if (close) { - setModalOpen(false); + try { + const close = await onDownloadNow(values); + if (close) { + setModalOpen(false); + } + } catch (e: any) { + messageApi.error(e?.message); } } catch (e: any) { - messageApi.error(e?.message); + messageApi.error(t("pleaseEnterCorrectFomeInfo")); } }} > @@ -279,6 +287,7 @@ const DownloadForm = forwardRef( rules={[ { required: true, + message: t("pleaseEnterVideoName"), }, ]} > @@ -310,7 +319,7 @@ const DownloadForm = forwardRef( rules={[ { required: true, - message: t("pleaseEnterVideoName"), + message: t("pleaseEnterCorrectFomeInfo"), }, ]} tooltip={canChangeType && t("canUseMouseWheelToAdjust")} diff --git a/packages/renderer/src/components/DownloadTag.tsx b/packages/renderer/src/components/DownloadTag.tsx index c665d696..4190260a 100644 --- a/packages/renderer/src/components/DownloadTag.tsx +++ b/packages/renderer/src/components/DownloadTag.tsx @@ -11,7 +11,7 @@ export function DownloadTag({ icon, text, color }: DownloadTagProps) { return (
diff --git a/packages/renderer/src/i18n/index.ts b/packages/renderer/src/i18n/index.ts index 55f62b49..d53778a8 100644 --- a/packages/renderer/src/i18n/index.ts +++ b/packages/renderer/src/i18n/index.ts @@ -110,6 +110,7 @@ i18n pleaseEnterVideoLink: "Please enter video link", videoName: "Video Name", pleaseEnterVideoName: "Please enter video name", + pleaseEnterCorrectFomeInfo: "Please enter the correct information", additionalHeaders: "Additional Headers", pleaseEnterOnlineVideoUrl: "Please enter online network video URL", pleaseEnterCorrectVideoLink: "Please enter correct video link", @@ -235,6 +236,7 @@ Referer: http://www.example.com`, pleaseEnterVideoLink: "请输入站点视频链接", videoName: "视频名称", pleaseEnterVideoName: "请输入视频名称", + pleaseEnterCorrectFomeInfo: "请输入正确的表单信息", additionalHeaders: "附加标头", pleaseEnterOnlineVideoUrl: "请输入在线网络视频URL", pleaseEnterCorrectVideoLink: "请输入正确的视频链接", diff --git a/packages/renderer/src/pages/HomePage/components/DownloadList.tsx b/packages/renderer/src/pages/HomePage/components/DownloadList.tsx index d39a2356..599c492f 100644 --- a/packages/renderer/src/pages/HomePage/components/DownloadList.tsx +++ b/packages/renderer/src/pages/HomePage/components/DownloadList.tsx @@ -211,7 +211,11 @@ export function DownloadList({ onDownloadItems={onDownloadItems} onCancelItems={onCancelItems} /> -
+
{data.map((item) => { let currProgress; if (