feat: enhance online drive connection UI and add localization for connection status in dataset pipeline

This commit is contained in:
twwu
2025-06-26 14:24:50 +08:00
parent 3a9c79b09a
commit 2a25ca2b2c
6 changed files with 72 additions and 45 deletions

View File

@ -57,25 +57,26 @@ export const useDatasourceOptions = (pipelineNodes: Node<DataSourceNodeType>[])
data: node.data,
})
})
// todo: delete mock data
options.push({
label: 'Google Drive',
value: '123456',
// @ts-expect-error mock data
data: {
datasource_parameters: {},
datasource_configurations: {},
type: BlockEnum.DataSource,
title: 'Google Drive',
plugin_id: 'langgenius/google-drive',
provider_type: 'online_drive',
provider_name: 'google_drive',
datasource_name: 'google-drive',
datasource_label: 'Google Drive',
selected: false,
},
})
if (process.env.NODE_ENV === 'development') {
// todo: delete mock data
options.push({
label: 'Google Drive',
value: '123456',
// @ts-expect-error mock data
data: {
datasource_parameters: {},
datasource_configurations: {},
type: BlockEnum.DataSource,
title: 'Google Drive',
plugin_id: 'langgenius/google-drive',
provider_type: 'online_drive',
provider_name: 'google_drive',
datasource_name: 'google-drive',
datasource_label: 'Google Drive',
selected: false,
},
})
}
return options
}, [datasourceNodes])