From bcf897d50a11ba504fda9bf5f1afcb4f222a1612 Mon Sep 17 00:00:00 2001 From: "shiweisong.ssw" Date: Thu, 29 Jun 2023 10:23:54 +0800 Subject: [PATCH] feat: make text source optional --- datacenter/app/datastores/documents/page.tsx | 8 ++------ datacenter/app/datastores/page.tsx | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/datacenter/app/datastores/documents/page.tsx b/datacenter/app/datastores/documents/page.tsx index 7ce660f81..e5c8575dd 100644 --- a/datacenter/app/datastores/documents/page.tsx +++ b/datacenter/app/datastores/documents/page.tsx @@ -296,9 +296,9 @@ const Documents = () => { ) : ( <> - Source: + Text Source(Optional): setTextSource(e.target.value)} sx={{ marginBottom: '20px' }} /> @@ -395,10 +395,6 @@ const Documents = () => { message.error(data.err_msg || 'failed') } } else { - if (textSource === '') { - message.error('Please input the source') - return - } if (text === '') { message.error('Please input the text') return diff --git a/datacenter/app/datastores/page.tsx b/datacenter/app/datastores/page.tsx index ec13378d3..f99e138f8 100644 --- a/datacenter/app/datastores/page.tsx +++ b/datacenter/app/datastores/page.tsx @@ -308,9 +308,9 @@ const Index = () => { ) : ( <> - Source: + Text Source(Optional): setTextSource(e.target.value)} sx={{ marginBottom: '20px' }} /> @@ -379,10 +379,6 @@ const Index = () => { message.error(data.err_msg || 'failed') } } else { - if (textSource === '') { - message.error('Please input the source') - return - } if (text === '') { message.error('Please input the text') return