diff --git a/frontend/src/lib/components/FlowStatusViewer.svelte b/frontend/src/lib/components/FlowStatusViewer.svelte index 1f83e626ec..654a5f426b 100644 --- a/frontend/src/lib/components/FlowStatusViewer.svelte +++ b/frontend/src/lib/components/FlowStatusViewer.svelte @@ -1,6 +1,6 @@ + + + {@html github} + + +{#if !embedded} + +{/if} +{#if tab == 'ui'} +
+

+ {flow.value.modules.length} Steps + +

+ +
+{:else} + +{/if} diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts index 6b28ec4556..55a48f93fb 100644 --- a/frontend/src/lib/utils.ts +++ b/frontend/src/lib/utils.ts @@ -402,3 +402,11 @@ export function setInputCat(type: string | undefined, format: string | undefined return 'string' } } + +export function scriptPathToHref(path: string): string { + if (path.startsWith('hub/')) { + return 'https://hub.windmill.dev/scripts/get/' + path.substring(4) + } else { + return `/scripts/get/${path}` + } +} diff --git a/frontend/src/routes/flows/get/[...path].svelte b/frontend/src/routes/flows/get/[...path].svelte index 9d7365cfb4..8f60e1f2b9 100644 --- a/frontend/src/routes/flows/get/[...path].svelte +++ b/frontend/src/routes/flows/get/[...path].svelte @@ -11,10 +11,7 @@ faCalendar, faShare } from '@fortawesome/free-solid-svg-icons' - import Highlight from 'svelte-highlight' - import json from 'svelte-highlight/languages/json' - import github from 'svelte-highlight/styles/github' import Tooltip from '$lib/components/Tooltip.svelte' import ShareModal from '$lib/components/ShareModal.svelte' import { userStore, workspaceStore } from '$lib/stores' @@ -23,6 +20,7 @@ import SchemaViewer from '$lib/components/SchemaViewer.svelte' import Dropdown from '$lib/components/Dropdown.svelte' import CenteredPage from '$lib/components/CenteredPage.svelte' + import FlowViewer from '$lib/components/FlowViewer.svelte' let flow: Flow | undefined let can_write = false @@ -47,10 +45,6 @@ } - - {@html github} - -

@@ -190,7 +184,7 @@

Flow

- +
{/if}