mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 00:05:27 +00:00
fix script explorer
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
bind:inlineScript={hiddenInlineScript.script.inlineScript}
|
||||
/>
|
||||
{:else}
|
||||
<span class="text-gray-600 text-xs">No hiddenInlineScript.script defined</span>
|
||||
<span class="text-gray-600 text-xs">No script defined</span>
|
||||
{/if}
|
||||
</div>
|
||||
{#if Object.keys(hiddenInlineScript.script.fields).length > 0}
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
startIcon={{ icon: faCodeBranch }}
|
||||
btnClasses="truncate"
|
||||
>
|
||||
fork a detached script
|
||||
Copy a script
|
||||
</Button>
|
||||
<Button
|
||||
on:click={() => dispatch('delete')}
|
||||
|
||||
+8
-2
@@ -14,8 +14,14 @@
|
||||
|
||||
function deleteBackgroundScript(index: number) {
|
||||
// remove the script from the array at the index
|
||||
$app.hiddenInlineScripts.splice(index, 1)
|
||||
$app.hiddenInlineScripts = [...$app.hiddenInlineScripts]
|
||||
if ($app.hiddenInlineScripts.length - 1 == index) {
|
||||
$app.hiddenInlineScripts.splice(index, 1)
|
||||
$app.hiddenInlineScripts = [...$app.hiddenInlineScripts]
|
||||
} else {
|
||||
$app.hiddenInlineScripts[index].inlineScript = undefined
|
||||
$app.hiddenInlineScripts[index].name = `Background Script ${index}`
|
||||
$app.hiddenInlineScripts = $app.hiddenInlineScripts
|
||||
}
|
||||
|
||||
delete $runnableComponents[`bg_${index}`]
|
||||
}
|
||||
|
||||
+1
-2
@@ -14,7 +14,6 @@
|
||||
export let recomputeOnInputChanged: boolean = false
|
||||
|
||||
const colors = {
|
||||
red: 'text-red-800 border-red-600 bg-red-100',
|
||||
green: 'text-green-800 border-green-600 bg-green-100',
|
||||
indigo: 'text-indigo-800 border-indigo-600 bg-indigo-100',
|
||||
blue: 'text-blue-800 border-blue-600 bg-blue-100'
|
||||
@@ -159,7 +158,7 @@
|
||||
</div>
|
||||
<div class="flex flex-row gap-2 flex-wrap">
|
||||
{#each frontendDependencies as label, index}
|
||||
<span class={classNames(badgeClass, colors['red'])}>
|
||||
<span class={classNames(badgeClass, colors['blue'])}>
|
||||
{label}
|
||||
<button
|
||||
on:click={() => deleteDep(index)}
|
||||
|
||||
Reference in New Issue
Block a user