Files
windmill/frontend/src/lib/components/FlowTutorials.svelte
T
Faton Ramadani e1918ef66e Ignored tutorials (#2394)
* fix(frontend): add ignored tutorials

* fix(frontend): add ignored tutorials

* fix(frontend): tutorial code cleanup

* fix(frontend): refactor how buttons are created

* fix(frontend): Correctly handled ignored tutorials
2023-10-05 17:22:40 +02:00

44 lines
1.4 KiB
Svelte

<script lang="ts">
import { skipAllTodos } from '$lib/tutorialUtils'
import FlowBranchAll from './tutorials/FlowBranchAll.svelte'
import FlowBranchOne from './tutorials/FlowBranchOne.svelte'
import FlowBuilderTutorialSimpleFlow from './tutorials/FlowBuilderTutorialSimpleFlow.svelte'
import FlowBuilderTutorialsForLoop from './tutorials/FlowBuilderTutorialsForLoop.svelte'
let flowBuilderTutorialSimpleFlow: FlowBuilderTutorialSimpleFlow | undefined = undefined
let flowBuilderTutorialsForLoop: FlowBuilderTutorialsForLoop | undefined = undefined
let flowBranchOne: FlowBranchOne | undefined = undefined
let flowBranchAll: FlowBranchAll | undefined = undefined
export function runTutorialById(id: string) {
if (id === 'forloop') {
flowBuilderTutorialsForLoop?.runTutorial()
} else if (id === 'branchone') {
flowBranchOne?.runTutorial()
} else if (id === 'branchall') {
flowBranchAll?.runTutorial()
} else if (id === 'action') {
flowBuilderTutorialSimpleFlow?.runTutorial()
}
}
function skipAll() {
skipAllTodos()
}
</script>
<FlowBuilderTutorialSimpleFlow
bind:this={flowBuilderTutorialSimpleFlow}
on:error
on:skipAll={skipAll}
on:reload
/>
<FlowBuilderTutorialsForLoop
bind:this={flowBuilderTutorialsForLoop}
on:error
on:skipAll={skipAll}
on:reload
/>
<FlowBranchOne bind:this={flowBranchOne} on:error on:skipAll={skipAll} on:reload />
<FlowBranchAll bind:this={flowBranchAll} on:error on:skipAll={skipAll} on:reload />