diff --git a/web/app/components/workflow/header/version-history-item.tsx b/web/app/components/workflow/header/version-history-item.tsx index 2826da3c197c78..afa2f49dec16c0 100644 --- a/web/app/components/workflow/header/version-history-item.tsx +++ b/web/app/components/workflow/header/version-history-item.tsx @@ -1,5 +1,6 @@ import React from 'react' import dayjs from 'dayjs' +import { useTranslation } from 'react-i18next' import { WorkflowVersion } from '../types' import cn from '@/utils/classnames' import type { VersionHistory } from '@/types/workflow' @@ -11,6 +12,7 @@ type VersionHistoryItemProps = { } const VersionHistoryItem: React.FC = ({ item, selectedVersion, onClick }) => { + const { t } = useTranslation() const formatTime = (time: number) => dayjs.unix(time).format('YYYY-MM-DD HH:mm:ss') const renderVersionLabel = (version: string) => ( @@ -26,25 +28,17 @@ const VersionHistoryItem: React.FC = ({ item, selectedV return (
item.version !== WorkflowVersion.Draft && onClick(item)} > -
- - {formatTime(item.version === WorkflowVersion.Draft ? item.updated_at : item.created_at)} - -
- {renderVersionLabel(item.version)} - - published by {item.created_by.name} - -
+
+ {formatTime(item.version === WorkflowVersion.Draft ? item.updated_at : item.created_at)} + {t('workflow.panel.createdBy')} {item.created_by.name}
+ {renderVersionLabel(item.version)}
) } diff --git a/web/app/components/workflow/header/view-history.tsx b/web/app/components/workflow/header/view-history.tsx index a18ddad65df8a8..82d8a302c58de0 100644 --- a/web/app/components/workflow/header/view-history.tsx +++ b/web/app/components/workflow/header/view-history.tsx @@ -202,7 +202,7 @@ const ViewHistory = ({ {`Test ${isChatMode ? 'Chat' : 'Run'}#${item.sequence_number}`}
- {item.created_by_account.name} · {formatTimeFromNow((item.finished_at || item.created_at) * 1000)} + {item.created_by_account?.name} · {formatTimeFromNow((item.finished_at || item.created_at) * 1000)}