diff --git a/frontend/src/lib/components/common/actionRow/ActionRow.svelte b/frontend/src/lib/components/common/actionRow/ActionRow.svelte
index 3203443ee0..bc4b3e94cf 100644
--- a/frontend/src/lib/components/common/actionRow/ActionRow.svelte
+++ b/frontend/src/lib/components/common/actionRow/ActionRow.svelte
@@ -8,20 +8,20 @@
class={'w-full flex flex-wrap justify-between items-center gap-4 ' +
(applyPageWidth ? classes : '')}
>
- {#if $$slots.left}
-
+
+ {#if $$slots.left}
-
- {/if}
- {#if $$slots.middle}
-
+ {/if}
+
+
+ {#if $$slots.middle}
-
- {/if}
- {#if $$slots.right}
-
+ {/if}
+
+
+ {#if $$slots.right}
-
- {/if}
+ {/if}
+
diff --git a/frontend/src/lib/components/common/button/Button.svelte b/frontend/src/lib/components/common/button/Button.svelte
index d1190263e4..f7c0d8099d 100644
--- a/frontend/src/lib/components/common/button/Button.svelte
+++ b/frontend/src/lib/components/common/button/Button.svelte
@@ -48,8 +48,8 @@
}
const spacingClasses: Record = {
- xs: 'px-2.5 py-1',
- sm: 'px-2.5 py-1',
+ xs: 'px-3 py-1.5',
+ sm: 'px-3 py-1.5',
md: 'px-4 py-2',
lg: 'px-4 py-2',
xl: 'px-4 py-2'
diff --git a/frontend/src/lib/components/flows/flowStateUtils.ts b/frontend/src/lib/components/flows/flowStateUtils.ts
index b22a74c48d..92f97b581f 100644
--- a/frontend/src/lib/components/flows/flowStateUtils.ts
+++ b/frontend/src/lib/components/flows/flowStateUtils.ts
@@ -132,7 +132,7 @@ export async function createScriptFromInlineScript({
const path = `${flow.path}/${suffix}`
const forkedDescription = wasForked ? `as a fork of ${originalScriptPath}` : ''
- const description = `This script was edited in place of flow ${flow.path} ${forkedDescription} by ${user?.username}}.`
+ const description = `This script was edited in place of flow ${flow.path} ${forkedDescription} by ${user?.username}.`
const availablePath = await findNextAvailablePath(path)
@@ -206,13 +206,12 @@ export function getStepPropPicker(
const flowInput = schemaToObject(flowInputSchema, args)
const results = getPreviousResults(flowState.modules, parentIndex)
-
const lastResult =
parentIndex == 0
? flowInput
: results.length > 0
- ? results[results.length - 1]
- : NEVER_TESTED_THIS_FAR
+ ? results[results.length - 1]
+ : NEVER_TESTED_THIS_FAR
if (isInsideLoop) {
let forLoopFlowInput = {
@@ -236,8 +235,8 @@ export function getStepPropPicker(
childIndex == 0
? forLoopFlowInput
: innerResults.length > 0
- ? innerResults[innerResults.length - 1]
- : NEVER_TESTED_THIS_FAR
+ ? innerResults[innerResults.length - 1]
+ : NEVER_TESTED_THIS_FAR
const extraLib = buildExtraLib(
objectToTsType(forLoopFlowInput),
@@ -294,32 +293,34 @@ function getResult(job: Job | undefined): Result | undefined {
}
}
-export function mapJobResultsToFlowState(
- jobs: JobResult,
- upto: number
-): void {
-
+export function mapJobResultsToFlowState(jobs: JobResult, upto: number): void {
const results = jobs.innerJobs.map(({ job, loopJobs }) => {
if (loopJobs && loopJobs.length > 0) {
- return [job?.args, loopJobs.map(({ job }) => {
- return getResult(job)
- })]
+ return [
+ job?.args,
+ loopJobs.map(({ job }) => {
+ return getResult(job)
+ })
+ ]
} else {
return [job?.args, getResult(job)]
}
})
-
-
const old = get(flowStateStore)
const modules = old.modules.map((flowModuleState: FlowModuleState, index: number) => {
if (results[index] && index <= upto) {
- if (results[index][1] != NEVER_TESTED_THIS_FAR || flowModuleState.previewResult == undefined) {
+ if (
+ results[index][1] != NEVER_TESTED_THIS_FAR ||
+ flowModuleState.previewResult == undefined
+ ) {
flowModuleState.previewArgs = results[index][0]
flowModuleState.previewResult = results[index][1]
flowModuleState.childFlowModules?.map((innerMod, j) => {
const lastLoopJob = jobs.innerJobs[index].loopJobs?.length ?? 0
- innerMod.previewResult = getResult(jobs.innerJobs[index].loopJobs?.[lastLoopJob - 1]?.innerJobs?.[j]?.job)
+ innerMod.previewResult = getResult(
+ jobs.innerJobs[index].loopJobs?.[lastLoopJob - 1]?.innerJobs?.[j]?.job
+ )
})
}
}
@@ -332,4 +333,3 @@ export function mapJobResultsToFlowState(
failureModule: old.failureModule
})
}
-
diff --git a/frontend/src/lib/components/icons/HatIcon.svelte b/frontend/src/lib/components/icons/HatIcon.svelte
new file mode 100644
index 0000000000..a954d8e486
--- /dev/null
+++ b/frontend/src/lib/components/icons/HatIcon.svelte
@@ -0,0 +1,20 @@
+
+
+
diff --git a/frontend/src/lib/components/landing/FlowGettingStarted.svelte b/frontend/src/lib/components/landing/FlowGettingStarted.svelte
index 2a9a66428a..036c007212 100644
--- a/frontend/src/lib/components/landing/FlowGettingStarted.svelte
+++ b/frontend/src/lib/components/landing/FlowGettingStarted.svelte
@@ -1,25 +1,14 @@
@@ -29,67 +18,32 @@
the Hub!
-
-
diff --git a/frontend/src/lib/components/landing/RessourceGettingStarted.svelte b/frontend/src/lib/components/landing/RessourceGettingStarted.svelte
index 914eb4f767..6dbb5f1e38 100644
--- a/frontend/src/lib/components/landing/RessourceGettingStarted.svelte
+++ b/frontend/src/lib/components/landing/RessourceGettingStarted.svelte
@@ -1,51 +1,21 @@
Connect to apps like Slack, Google Drive or Airtable using OAuth.
-
-
goto('resources')}
- type="button"
- class="inline-flex items-center text-white bg-gray-700 hover:bg-gray-800 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center dark:bg-gray-600 dark:hover:bg-gray-500 dark:focus:ring-gray-600"
- >
-
- Connect an API
-
-
+
goto('resources')} color="dark" startIcon={{ icon: faLink }} size="xs">
+ Connect an API
+
diff --git a/frontend/src/lib/components/landing/ScriptBox.svelte b/frontend/src/lib/components/landing/ScriptBox.svelte
index 561027f89d..c2c6bd0ff4 100644
--- a/frontend/src/lib/components/landing/ScriptBox.svelte
+++ b/frontend/src/lib/components/landing/ScriptBox.svelte
@@ -3,6 +3,8 @@
import type { Script } from '$lib/gen'
import { truncateHash } from '$lib/utils'
+ import { faPencil, faPlay } from '@fortawesome/free-solid-svg-icons'
+ import { Button, Badge, ActionRow } from '$lib/components/common'
export let script: Script
@@ -16,70 +18,41 @@
{script.path}
-
+
{truncateHash(script.hash)}
-
+
-
- {String(script.language).toUpperCase()}
-
- {#if script.kind != 'script'}
-
+
+ {script.language}
+
+ {#if script.kind !== 'script'}
+
{script.kind}
-
+
{/if}
-
-
goto(`/scripts/edit/${script.hash}?step=2`)}
- type="button"
- class="inline-flex items-center text-gray-700 bg-transparent border border-gray-700 hover:bg-gray-800 hover:text-white focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg text-xs px-3 py-1.5 text-center"
- data-dismiss-target="#alert-additional-content-5"
- aria-label="Close"
- >
-
- Edit
-
+
+
+ goto(`/scripts/edit/${script.hash}?step=2`)}
+ color="dark"
+ size="xs"
+ variant="border"
+ startIcon={{ icon: faPencil }}
+ >
+ Edit
+
- goto(`/scripts/run/${script.hash}`)}
- type="button"
- class="inline-flex items-center text-gray-700 bg-transparent border border-gray-700 hover:bg-gray-800 hover:text-white focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg text-xs px-3 py-1.5 text-center"
- data-dismiss-target="#alert-additional-content-5"
- aria-label="Close"
- >
-
- Run
-
-
+ goto(`/scripts/run/${script.hash}`)}
+ color="dark"
+ size="xs"
+ variant="border"
+ startIcon={{ icon: faPlay }}
+ >
+ Run
+
+
+
diff --git a/frontend/src/lib/components/landing/ScriptGettingStarted.svelte b/frontend/src/lib/components/landing/ScriptGettingStarted.svelte
index 1e5870deb2..052f0ed697 100644
--- a/frontend/src/lib/components/landing/ScriptGettingStarted.svelte
+++ b/frontend/src/lib/components/landing/ScriptGettingStarted.svelte
@@ -1,93 +1,47 @@
Create a new script or find inspiration on the Hub!
-
-
+ goto('scripts/add')}
- type="button"
- class="mr-2 inline-flex items-center text-white bg-gray-700 hover:bg-gray-800 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg text-xs px-3 py-1.5 text-center"
+ color="dark"
+ size="xs"
+ btnClasses="mr-2"
+ startIcon={{ icon: faPlus }}
>
-
Create script
-
-
+ goto('https://docs.windmill.dev/docs/getting_started/scripts')}
- type="button"
- class="mr-2 inline-flex items-center text-white bg-blue-600 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-xs px-3 py-1.5 text-center"
+ color="blue"
+ size="xs"
+ btnClasses="mr-2"
+ startIcon={{ icon: faFile }}
>
-
Script documentation
-
-
+ goto('https://hub.windmill.dev/')}
- type="button"
- class="inline-flex items-center text-gray-700 bg-transparent border border-gray-700 hover:bg-gray-800 hover:text-white focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg text-xs px-3 py-1.5 text-center"
- data-dismiss-target="#alert-additional-content-5"
- aria-label="Close"
+ color="light"
+ variant="border"
+ size="xs"
+ startIcon={{ icon: faExternalLink }}
>
-
Explore community scripts on WindmillHub
-
+
diff --git a/frontend/src/routes/flows/get/[...path].svelte b/frontend/src/routes/flows/get/[...path].svelte
index 0c1b2463fd..250a26f619 100644
--- a/frontend/src/routes/flows/get/[...path].svelte
+++ b/frontend/src/routes/flows/get/[...path].svelte
@@ -99,7 +99,7 @@
href="/flows/run/{path}"
variant="contained"
color="blue"
- size="sm"
+ size="xs"
startIcon={{ icon: faPlay }}
>
Run
@@ -108,7 +108,7 @@
href="/flows/edit/{path}"
variant="contained"
color="blue"
- size="sm"
+ size="xs"
startIcon={{ icon: faEdit }}
disabled={!can_write}
>
@@ -118,7 +118,7 @@
href="/flows/add?template={flow.path}"
variant="contained"
color="blue"
- size="sm"
+ size="xs"
startIcon={{ icon: faCodeFork }}
>
Use as template/Fork
@@ -129,7 +129,7 @@
href="/runs/{flow.path}"
variant="border"
color="blue"
- size="sm"
+ size="xs"
startIcon={{ icon: faList }}
>
View runs
@@ -139,7 +139,7 @@
href={flowToHubUrl(flow).toString()}
variant="border"
color="blue"
- size="sm"
+ size="xs"
startIcon={{ icon: faGlobe }}
>
Publish to Hub
diff --git a/frontend/src/routes/scripts/get/[...hash].svelte b/frontend/src/routes/scripts/get/[...hash].svelte
index e0321639f9..dc1352a74d 100644
--- a/frontend/src/routes/scripts/get/[...hash].svelte
+++ b/frontend/src/routes/scripts/get/[...hash].svelte
@@ -135,18 +135,16 @@
Run
@@ -155,9 +153,8 @@
{#if !topHash}
Use as template/Fork
@@ -169,7 +166,7 @@
href={`/runs/${script.path}`}
variant="border"
color="blue"
- size="sm"
+ size="xs"
startIcon={{ icon: faList }}
>
View runs
@@ -184,7 +181,7 @@
).toString()}
variant="border"
color="blue"
- size="sm"
+ size="xs"
startIcon={{ icon: faGlobe }}
>
Publish to Hub
@@ -349,7 +346,7 @@
copyToClipboard(url)}
color="blue"
- size="sm"
+ size="xs"
startIcon={{ icon: faClipboard }}
btnClasses="ml-2"
>