fix minor UX bugs
This commit is contained in:
@@ -165,7 +165,7 @@
|
||||
argName,
|
||||
previousModuleId,
|
||||
staticTemplate
|
||||
? `\`${arg?.value.toString().replaceAll('`', '\\`') ?? ''}\``
|
||||
? `\`${arg?.value?.toString().replaceAll('`', '\\`') ?? ''}\``
|
||||
: arg.value
|
||||
? JSON.stringify(arg?.value, null, 4)
|
||||
: ''
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
export let topButton = false
|
||||
export let loading = false
|
||||
export let noVariablePicker = false
|
||||
export let viewCliRun = false
|
||||
|
||||
export let args: Record<string, any> = decodeArgs($page.url.searchParams.get('args') ?? undefined)
|
||||
|
||||
@@ -208,19 +209,21 @@
|
||||
</Button>
|
||||
{/if}
|
||||
|
||||
<div class="my-10" />
|
||||
<Button
|
||||
color="light"
|
||||
size="sm"
|
||||
endIcon={{ icon: viewCliOptions ? faChevronUp : faChevronDown }}
|
||||
on:click={() => (viewCliOptions = !viewCliOptions)}
|
||||
>
|
||||
Run it from the CLI
|
||||
</Button>
|
||||
{#if viewCliOptions}
|
||||
<div transition:slide class="mt-2 px-4 pt-2">
|
||||
<InlineCodeCopy content={cliCommand} />
|
||||
<CliHelpBox />
|
||||
</div>
|
||||
{#if viewCliRun}
|
||||
<div class="my-10" />
|
||||
<Button
|
||||
color="light"
|
||||
size="sm"
|
||||
endIcon={{ icon: viewCliOptions ? faChevronUp : faChevronDown }}
|
||||
on:click={() => (viewCliOptions = !viewCliOptions)}
|
||||
>
|
||||
Run it from the CLI
|
||||
</Button>
|
||||
{#if viewCliOptions}
|
||||
<div transition:slide class="mt-2 px-4 pt-2">
|
||||
<InlineCodeCopy content={cliCommand} />
|
||||
<CliHelpBox />
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -292,6 +292,7 @@
|
||||
runnable={flow}
|
||||
runAction={runFlow}
|
||||
bind:args
|
||||
viewCliRun
|
||||
/>
|
||||
</div>
|
||||
{#if !emptyString(flow.description)}
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
detailed={false}
|
||||
runnable={flow}
|
||||
runAction={runFlow}
|
||||
viewCliRun
|
||||
/>
|
||||
{:else}
|
||||
<Skeleton layout={[2, [3], 1, [2], 4, [4], 3, [8]]} />
|
||||
|
||||
@@ -390,6 +390,7 @@
|
||||
runnable={script}
|
||||
runAction={runScript}
|
||||
bind:args
|
||||
viewCliRun
|
||||
/>
|
||||
</div>
|
||||
{#if !emptyString(script.description)}
|
||||
|
||||
@@ -192,6 +192,7 @@
|
||||
bind:this={runForm}
|
||||
runnable={script}
|
||||
runAction={runScript}
|
||||
viewCliRun
|
||||
/>
|
||||
{/if}
|
||||
{:else}
|
||||
|
||||
Reference in New Issue
Block a user