diff --git a/src/lib/workflows/builder/function-template.ts b/src/lib/workflows/builder/function-template.ts index 25ff11e..a6d6679 100644 --- a/src/lib/workflows/builder/function-template.ts +++ b/src/lib/workflows/builder/function-template.ts @@ -12,7 +12,7 @@ type GeneratorParams = { type FunctionParams = { sigma: number } | { x: number; y: number; width: number; height: number } | Record export const DEFAULT_PARAMS: { [functionName: string]: FunctionParams } = { - blur: { sigma: 0.1 }, + blur: { sigma: 20 }, crop: { x: 50, y: 50, width: 100, height: 100 }, grayscale: {}, rotate90: {} diff --git a/src/routes/workflows/+layout.svelte b/src/routes/workflows/+layout.svelte index cf14cfa..9f0fcb1 100644 --- a/src/routes/workflows/+layout.svelte +++ b/src/routes/workflows/+layout.svelte @@ -22,7 +22,10 @@ // @ts-ignore-next-line uint8arrays.toString(workflowsFromWNFS.content) ) - $workflowsStore.workflows = parsedWorkflows + $workflowsStore.workflows = [ + ...$workflowsStore.workflows, + ...parsedWorkflows.filter(w => !w.id.includes('sampleWorkflow')) + ] } $workflowsStore.loading = false }) diff --git a/src/routes/workflows/components/WorkflowBuilder.svelte b/src/routes/workflows/components/WorkflowBuilder.svelte index c164a5d..4fdbc49 100644 --- a/src/routes/workflows/components/WorkflowBuilder.svelte +++ b/src/routes/workflows/components/WorkflowBuilder.svelte @@ -43,9 +43,13 @@ // Save all workflows to the user's WNFS const pushWorkflowsToWNFS = async () => { + const clonedWorkflows = JSON.parse( + JSON.stringify($workflowsStore.workflows) + ) + await $filesystemStore.write( odd.path.combine(WORKFLOWS_DIR, odd.path.file('workflows.json')), - new TextEncoder().encode(JSON.stringify($workflowsStore.workflows)) + new TextEncoder().encode(JSON.stringify(clonedWorkflows.splice(3))) ) await $filesystemStore.publish()