File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed
projects/app/src/pageComponents/dataset/detail/CollectionCard Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,9 @@ const CollectionPageContextProvider = ({ children }: { children: ReactNode }) =>
76
76
} ) ;
77
77
const syncWebsite = async ( ) => {
78
78
await checkTeamWebSyncLimit ( ) ;
79
- await postWebsiteSync ( { datasetId : datasetId } ) ;
80
- await loadDatasetDetail ( datasetId ) ;
79
+ postWebsiteSync ( { datasetId : datasetId } ) . then ( ( ) => {
80
+ loadDatasetDetail ( datasetId ) ;
81
+ } ) ;
81
82
} ;
82
83
const {
83
84
isOpen : isOpenWebsiteModal ,
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
37
37
38
38
const FileSourceSelector = dynamic ( ( ) => import ( '../Import/components/FileSourceSelector' ) ) ;
39
39
40
- const Header = ( { } : { } ) => {
40
+ const Header = ( { hasTrainingData } : { hasTrainingData : boolean } ) => {
41
41
const { t } = useTranslation ( ) ;
42
42
const { feConfigs } = useSystemStore ( ) ;
43
43
const { isPc } = useSystem ( ) ;
@@ -283,13 +283,15 @@ const Header = ({}: {}) => {
283
283
>
284
284
{ t ( 'dataset:params_config' ) }
285
285
</ Button >
286
- < Button
287
- variant = { 'whitePrimary' }
288
- onClick = { openWebSyncConfirm }
289
- leftIcon = { < Icon name = "common/confirm/restoreTip" w = { '1rem' } /> }
290
- >
291
- { t ( 'dataset:immediate_sync' ) }
292
- </ Button >
286
+ { ! hasTrainingData && (
287
+ < Button
288
+ variant = { 'whitePrimary' }
289
+ onClick = { openWebSyncConfirm }
290
+ leftIcon = { < Icon name = "common/confirm/restoreTip" w = { '1rem' } /> }
291
+ >
292
+ { t ( 'dataset:immediate_sync' ) }
293
+ </ Button >
294
+ ) }
293
295
</ HStack >
294
296
) }
295
297
{ datasetDetail . status === DatasetStatusEnum . syncing && (
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ const CollectionCard = () => {
196
196
< MyBox isLoading = { isLoading } h = { '100%' } py = { [ 2 , 4 ] } >
197
197
< Flex ref = { BoxRef } flexDirection = { 'column' } py = { [ 1 , 0 ] } h = { '100%' } px = { [ 2 , 6 ] } >
198
198
{ /* header */ }
199
- < Header />
199
+ < Header hasTrainingData = { hasTrainingData } />
200
200
201
201
{ /* collection table */ }
202
202
< TableContainer mt = { 3 } overflowY = { 'auto' } fontSize = { 'sm' } >
You can’t perform that action at this time.
0 commit comments