Skip to content

Commit

Permalink
fix: disable toggle is more consistently applied on arg inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Feb 21, 2025
1 parent 03903d0 commit 470be4b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 20 deletions.
6 changes: 6 additions & 0 deletions backend/windmill-worker/nsjail/run.ansible.config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ mount {
mandatory: false
}

mount {
src: "/root/.local/share/uv/tools/ansible"
dst: "/root/.local/share/uv/tools/ansible"
is_bind: true
}

mount {
src: "/usr"
dst: "/usr"
Expand Down
45 changes: 25 additions & 20 deletions frontend/src/lib/components/ArgInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@
bind:value
currency={extra?.currency}
locale={extra?.currencyLocale ?? 'en-US'}
{disabled}
/>
{:else}
<div class="relative w-full">
Expand Down Expand Up @@ -982,29 +983,33 @@
</div>
{:else if inputCat == 'date'}
{#if format === 'date'}
<DateInput {autofocus} bind:value dateFormat={extra?.['dateFormat']} />
<DateInput {disabled} {autofocus} bind:value dateFormat={extra?.['dateFormat']} />
{:else}
<DateTimeInput useDropdown {autofocus} bind:value />
<DateTimeInput {disabled} useDropdown {autofocus} bind:value />
{/if}
{:else if inputCat == 'sql' || inputCat == 'yaml'}
<div class="border my-1 mb-4 w-full border-primary">
{#await import('$lib/components/SimpleEditor.svelte')}
<Loader2 class="animate-spin" />
{:then Module}
<Module.default
on:focus={(e) => {
dispatch('focus')
}}
on:blur={(e) => {
dispatch('blur')
}}
bind:this={editor}
lang={inputCat}
bind:code={value}
autoHeight
/>
{/await}
</div>
{#if disabled}
<textarea disabled />
{:else}
<div class="border my-1 mb-4 w-full border-secondary">
{#await import('$lib/components/SimpleEditor.svelte')}
<Loader2 class="animate-spin" />
{:then Module}
<Module.default
on:focus={(e) => {
dispatch('focus')
}}
on:blur={(e) => {
dispatch('blur')
}}
bind:this={editor}
lang={inputCat}
bind:code={value}
autoHeight
/>
{/await}
</div>
{/if}
{:else if inputCat == 'base64'}
<div class="flex flex-col my-6 w-full">
<input
Expand Down

0 comments on commit 470be4b

Please sign in to comment.