feat: workflow remove preview mode (#3941)

This commit is contained in:
zxhlyh
2024-04-28 17:09:56 +08:00
committed by GitHub
parent 0940f01634
commit 8e4989ed03
33 changed files with 549 additions and 309 deletions

View File

@@ -1,22 +1,22 @@
import { memo } from 'react'
import { useTranslation } from 'react-i18next'
import { useStore as useAppStore } from '@/app/components/app/store'
import { Play } from '@/app/components/base/icons/src/vender/solid/mediaAndDevices'
import { useIsChatMode } from '../hooks'
import { useStore } from '../store'
import { ClockPlay } from '@/app/components/base/icons/src/vender/line/time'
const RunningTitle = () => {
const { t } = useTranslation()
const appDetail = useAppStore(state => state.appDetail)
const isChatMode = useIsChatMode()
const historyWorkflowData = useStore(s => s.historyWorkflowData)
return (
<div className='flex items-center h-[18px] text-xs text-primary-600'>
<Play className='mr-1 w-3 h-3' />
{
appDetail?.mode === 'advanced-chat'
? t('workflow.common.inPreviewMode')
: t('workflow.common.inRunMode')
}
<div className='flex items-center h-[18px] text-xs text-gray-500'>
<ClockPlay className='mr-1 w-3 h-3 text-gray-500' />
<span>{isChatMode ? `Test Chat#${historyWorkflowData?.sequence_number}` : `Test Run#${historyWorkflowData?.sequence_number}`}</span>
<span className='mx-1'>·</span>
<span className='text-gray-500'>Test Run#2</span>
<span className='ml-1 uppercase flex items-center px-1 h-[18px] rounded-[5px] border border-indigo-300 bg-white/[0.48] text-[10px] font-semibold text-indigo-600'>
{t('workflow.common.viewOnly')}
</span>
</div>
)
}