Ver código fonte

fix: fixed incorrect operation of publishing as tool (#14561)

tags/1.0.1
圣痕 8 meses atrás
pai
commit
66654faef3
Nenhuma conta vinculada ao e-mail do autor do commit

+ 1
- 1
web/app/components/app/app-publisher/index.tsx Ver arquivo

)} )}
<SuggestedAction <SuggestedAction
onClick={() => { onClick={() => {
handleOpenInExplore()
publishedAt && handleOpenInExplore()
}} }}
disabled={!publishedAt} disabled={!publishedAt}
icon={<RiPlanetLine className='w-4 h-4' />} icon={<RiPlanetLine className='w-4 h-4' />}

+ 4
- 4
web/app/components/tools/workflow-tool/configure-button.tsx Ver arquivo

<div className={cn( <div className={cn(
'group bg-background-section-burn rounded-lg transition-colors', 'group bg-background-section-burn rounded-lg transition-colors',
disabled ? 'shadow-xs opacity-30 cursor-not-allowed' : 'cursor-pointer', disabled ? 'shadow-xs opacity-30 cursor-not-allowed' : 'cursor-pointer',
!published && 'hover:bg-primary-50',
!disabled && !published && 'hover:bg-primary-50',
)}> )}>
{isCurrentWorkspaceManager {isCurrentWorkspaceManager
? ( ? (
<div <div
className='flex justify-start items-center text-text-primary gap-2 px-2.5 py-2' className='flex justify-start items-center text-text-primary gap-2 px-2.5 py-2'
onClick={() => !published && setShowModal(true)}
onClick={() => !disabled && !published && setShowModal(true)}
> >
<Tools className={cn('relative w-4 h-4', !published && 'group-hover:text-primary-600')} />
<div title={t('workflow.common.workflowAsTool') || ''} className={cn('grow shrink basis-0 text-[13px] font-medium leading-[18px] truncate', !published && 'group-hover:text-primary-600')}>{t('workflow.common.workflowAsTool')}</div>
<Tools className={cn('relative w-4 h-4', !disabled && !published && 'group-hover:text-primary-600')} />
<div title={t('workflow.common.workflowAsTool') || ''} className={cn('grow shrink basis-0 text-[13px] font-medium leading-[18px] truncate', !disabled && !published && 'group-hover:text-primary-600')}>{t('workflow.common.workflowAsTool')}</div>
{!published && ( {!published && (
<span className='shrink-0 px-1 border border-divider-regular rounded-[5px] bg-background-default-subtle text-[10px] font-medium leading-[18px] text-text-tertiary'>{t('workflow.common.configureRequired').toLocaleUpperCase()}</span> <span className='shrink-0 px-1 border border-divider-regular rounded-[5px] bg-background-default-subtle text-[10px] font-medium leading-[18px] text-text-tertiary'>{t('workflow.common.configureRequired').toLocaleUpperCase()}</span>
)} )}

Carregando…
Cancelar
Salvar