|
|
|
@ -37,8 +37,14 @@ export type WorkflowSliceShape = {
|
|
|
|
export const createWorkflowSlice: StateCreator<WorkflowSliceShape> = set => ({
|
|
|
|
export const createWorkflowSlice: StateCreator<WorkflowSliceShape> = set => ({
|
|
|
|
workflowRunningData: undefined,
|
|
|
|
workflowRunningData: undefined,
|
|
|
|
setWorkflowRunningData: workflowRunningData => set(() => ({ workflowRunningData })),
|
|
|
|
setWorkflowRunningData: workflowRunningData => set(() => ({ workflowRunningData })),
|
|
|
|
clipboardElements: [],
|
|
|
|
clipboardElements: (() => {
|
|
|
|
setClipboardElements: clipboardElements => set(() => ({ clipboardElements })),
|
|
|
|
const storedElements = localStorage.getItem('clipboard_elements')
|
|
|
|
|
|
|
|
return storedElements ? JSON.parse(storedElements) : []
|
|
|
|
|
|
|
|
})(),
|
|
|
|
|
|
|
|
setClipboardElements: (clipboardElements) => {
|
|
|
|
|
|
|
|
set(() => ({ clipboardElements }))
|
|
|
|
|
|
|
|
localStorage.setItem('clipboard_elements', JSON.stringify(clipboardElements))
|
|
|
|
|
|
|
|
},
|
|
|
|
selection: null,
|
|
|
|
selection: null,
|
|
|
|
setSelection: selection => set(() => ({ selection })),
|
|
|
|
setSelection: selection => set(() => ({ selection })),
|
|
|
|
bundleNodeSize: null,
|
|
|
|
bundleNodeSize: null,
|
|
|
|
|