mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
new restore
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { useCallback } from 'react'
|
||||
import { useHooksStore } from '@/app/components/workflow/hooks-store'
|
||||
import { collaborationManager } from '../collaboration/core/collaboration-manager'
|
||||
import { useStore } from '../store'
|
||||
import { useNodesReadOnly } from './use-workflow'
|
||||
|
||||
@ -28,6 +29,12 @@ export const useNodesSyncDraft = () => {
|
||||
if (getNodesReadOnly())
|
||||
return
|
||||
|
||||
if (collaborationManager.isConnected() && !collaborationManager.getIsLeader()) {
|
||||
if (sync)
|
||||
collaborationManager.emitSyncRequest()
|
||||
return
|
||||
}
|
||||
|
||||
if (sync)
|
||||
doSyncWorkflowDraft(notRefreshWhenSyncError, callback, forceUpload)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user