diff --git a/web/app/components/workflow/header/index.tsx b/web/app/components/workflow/header/index.tsx
index e80743a015..f2bcfc8f92 100644
--- a/web/app/components/workflow/header/index.tsx
+++ b/web/app/components/workflow/header/index.tsx
@@ -52,7 +52,6 @@ const Header: FC = () => {
const workflowStore = useWorkflowStore()
const appDetail = useAppStore(s => s.appDetail)
const setAppDetail = useAppStore(s => s.setAppDetail)
- const appSidebarExpand = useAppStore(s => s.appSidebarExpand)
const systemFeatures = useContextSelector(AppContext, state => state.systemFeatures)
const appID = appDetail?.id
const isChatMode = useIsChatMode()
@@ -210,11 +209,6 @@ const Header: FC = () => {
className='absolute top-0 left-0 z-10 flex items-center justify-between w-full px-3 h-14 bg-mask-top2bottom-gray-50-to-transparent'
>
- {
- appSidebarExpand === 'collapse' && (
-
{appDetail?.name}
- )
- }
{
normal &&
}
diff --git a/web/app/components/workflow/header/restoring-title.tsx b/web/app/components/workflow/header/restoring-title.tsx
index 344e5e2754..c7fa434253 100644
--- a/web/app/components/workflow/header/restoring-title.tsx
+++ b/web/app/components/workflow/header/restoring-title.tsx
@@ -1,19 +1,47 @@
-import { memo } from 'react'
+import { memo, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { useWorkflow } from '../hooks'
import { useStore } from '../store'
-import { ClockRefresh } from '@/app/components/base/icons/src/vender/line/time'
+import { WorkflowVersion } from '../types'
+import useTimestamp from '@/hooks/use-timestamp'
const RestoringTitle = () => {
const { t } = useTranslation()
const { formatTimeFromNow } = useWorkflow()
- const publishedAt = useStore(state => state.publishedAt)
+ const { formatTime } = useTimestamp()
+ const currentVersion = useStore(state => state.currentVersion)
+ const isDraft = currentVersion?.version === WorkflowVersion.Draft
+ const publishStatus = isDraft ? t('workflow.common.unpublished') : t('workflow.common.published')
+
+ const versionName = useMemo(() => {
+ if (isDraft)
+ return t('workflow.versionHistory.currentDraft')
+ return currentVersion?.marked_name || t('workflow.versionHistory.defaultName')
+ }, [currentVersion, t, isDraft])
return (
-
-
- {t('workflow.common.latestPublished')}
- {formatTimeFromNow(publishedAt)}
+
+
+
+ {versionName}
+
+
+ {t('workflow.common.viewOnly')}
+
+
+
+ {
+ currentVersion && (
+ <>
+ {publishStatus}
+ ·
+ {`${formatTimeFromNow((isDraft ? currentVersion.updated_at : currentVersion.created_at) * 1000)} ${formatTime(currentVersion.created_at, 'HH:mm:ss')}`}
+ ·
+ {currentVersion?.created_by?.name || ''}
+ >
+ )
+ }
+
)
}
diff --git a/web/app/components/workflow/nodes/_base/components/info-panel.tsx b/web/app/components/workflow/nodes/_base/components/info-panel.tsx
index e960931d49..4fa7d35f38 100644
--- a/web/app/components/workflow/nodes/_base/components/info-panel.tsx
+++ b/web/app/components/workflow/nodes/_base/components/info-panel.tsx
@@ -13,7 +13,7 @@ const InfoPanel: FC
= ({
}) => {
return (
-
+
{title}
diff --git a/web/types/workflow.ts b/web/types/workflow.ts
index 1c1a3b7963..b2d1a30a31 100644
--- a/web/types/workflow.ts
+++ b/web/types/workflow.ts
@@ -111,6 +111,11 @@ export type FetchWorkflowDraftResponse = {
}
hash: string
updated_at: number
+ updated_by: {
+ id: string
+ name: string
+ email: string
+ },
tool_published: boolean
environment_variables?: EnvironmentVariable[]
conversation_variables?: ConversationVariable[]