fix: update version show problem

This commit is contained in:
Joel 2024-11-26 14:38:43 +08:00
parent d40f0e645c
commit b8af4aead1
2 changed files with 10 additions and 1 deletions

View File

@ -201,7 +201,15 @@ const DetailHeader = ({
}
/>
{(hasNewVersion || isFromGitHub) && (
<Button variant='secondary-accent' size='small' className='!h-5' onClick={handleUpdate}>{t('plugin.detailPanel.operation.update')}</Button>
<Button variant='secondary-accent' size='small' className='!h-5' onClick={() => {
if (isFromMarketplace) {
setTargetVersion({
version: latest_version,
unique_identifier: latest_unique_identifier,
})
}
handleUpdate()
}}>{t('plugin.detailPanel.operation.update')}</Button>
)}
</div>
<div className='mb-1 flex justify-between items-center h-4'>

View File

@ -89,6 +89,7 @@ const UpdatePluginModal: FC<Props> = ({
})
onSave()
}
// eslint-disable-next-line unused-imports/no-unused-vars
catch (e) {
setUploadStep(UploadStep.notStarted)
}