fix: auto generate prompt result not show (#2678)

This commit is contained in:
Joel 2024-03-04 17:36:11 +08:00 committed by GitHub
parent 8523b34be7
commit 3c1825187a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,14 +74,14 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
const [res, setRes] = React.useState<AutomaticRes | null>(null) const [res, setRes] = React.useState<AutomaticRes | null>(null)
const renderLoading = ( const renderLoading = (
<div className='grow flex flex-col items-center justify-center h-full space-y-3'> <div className='w-0 grow flex flex-col items-center justify-center h-full space-y-3'>
<Loading /> <Loading />
<div className='text-[13px] text-gray-400'>{t('appDebug.automatic.loading')}</div> <div className='text-[13px] text-gray-400'>{t('appDebug.automatic.loading')}</div>
</div> </div>
) )
const renderNoData = ( const renderNoData = (
<div className='grow flex flex-col items-center justify-center h-full space-y-3'> <div className='w-0 grow flex flex-col items-center px-8 justify-center h-full space-y-3'>
{noDataIcon} {noDataIcon}
<div className='text-[13px] text-gray-400'>{t('appDebug.automatic.noData')}</div> <div className='text-[13px] text-gray-400'>{t('appDebug.automatic.noData')}</div>
</div> </div>
@ -142,7 +142,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
<div className='text-[13px] font-normal text-gray-500'>{t('appDebug.automatic.description')}</div> <div className='text-[13px] font-normal text-gray-500'>{t('appDebug.automatic.description')}</div>
</div> </div>
{/* inputs */} {/* inputs */}
<div className='mt-12 space-y-5'> <div className='mt-2 space-y-5'>
<div className='space-y-2'> <div className='space-y-2'>
<div className='text-[13px] font-medium text-gray-900'>{t('appDebug.automatic.intendedAudience')}</div> <div className='text-[13px] font-medium text-gray-900'>{t('appDebug.automatic.intendedAudience')}</div>
<input className="w-full h-8 px-3 text-[13px] font-normal bg-gray-50 rounded-lg" placeholder={t('appDebug.automatic.intendedAudiencePlaceHolder') as string} value={audiences} onChange={e => setAudiences(e.target.value)} /> <input className="w-full h-8 px-3 text-[13px] font-normal bg-gray-50 rounded-lg" placeholder={t('appDebug.automatic.intendedAudiencePlaceHolder') as string} value={audiences} onChange={e => setAudiences(e.target.value)} />
@ -167,8 +167,8 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
</div>} </div>}
{(!isLoading && res) && ( {(!isLoading && res) && (
<div className='grow px-8 pt-6 h-full overflow-y-auto'> <div className='w-0 grow px-8 pt-6 h-full overflow-y-auto'>
<div className='mb-4 w-1/2 text-lg font-medium text-gray-900'>{t('appDebug.automatic.resTitle')}</div> <div className='mb-4 text-lg font-medium text-gray-900'>{t('appDebug.automatic.resTitle')}</div>
<ConfigPrompt <ConfigPrompt
mode={mode} mode={mode}
@ -196,7 +196,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
</div> </div>
)} )}
<div className='sticky bottom-0 flex justify-end right-0 py-4'> <div className='sticky bottom-0 flex justify-end right-0 py-4 bg-white'>
<Button onClick={onClose}>{t('common.operation.cancel')}</Button> <Button onClick={onClose}>{t('common.operation.cancel')}</Button>
<Button type='primary' className='ml-2' onClick={() => { <Button type='primary' className='ml-2' onClick={() => {
setShowConfirmOverwrite(true) setShowConfirmOverwrite(true)