This commit is contained in:
Peter Clement 2023-06-28 16:35:40 +01:00
parent 847684daf1
commit 8c7657a1b6
1 changed files with 20 additions and 20 deletions

View File

@ -64,8 +64,10 @@
</script> </script>
<div class="root"> <div class="root">
<div class="params"> <div class="fields">
<Label small>Automation</Label> <div class:title-padding={parameters.synchronous}>
<Label small>Automation</Label>
</div>
<div style="width: 100%"> <div style="width: 100%">
<Select <Select
on:change={onChange} on:change={onChange}
@ -75,26 +77,22 @@
getOptionLabel={x => x.name} getOptionLabel={x => x.name}
getOptionValue={x => x._id} getOptionValue={x => x._id}
/> />
{#if parameters.synchronous}
<div class="synchronous-info">
<Icon size="XS" name="Info" />
<Body size="XS">This automation will run synchronously</Body>
</div>
{/if}
</div> </div>
</div> </div>
<div class="fields"> {#if parameters.synchronous}
<Label small /> <div class="fields">
{#if parameters.synchronous}
<div class="synchronous-info">
<Icon size="XS" name="Info" />
<Body size="XS">This automation will run synchronously</Body>
</div>
{/if}
</div>
<div class="fields">
{#if parameters.synchronous}
<Label small>Timeout</Label> <Label small>Timeout</Label>
<div class="timeout-width"> <div class="timeout-width">
<Input type="number" {error} bind:value={parameters.timeout} /> <Input type="number" {error} bind:value={parameters.timeout} />
</div> </div>
{/if} </div>
</div> {/if}
<div class="fields"> <div class="fields">
{#if selectedSchema && selectedSchema.length} {#if selectedSchema && selectedSchema.length}
{#each selectedSchema as field, idx} {#each selectedSchema as field, idx}
@ -144,18 +142,20 @@
margin-top: var(--spacing-l); margin-top: var(--spacing-l);
} }
.title-padding {
padding-bottom: 20px;
}
.params { .params {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center;
gap: 25px; gap: 25px;
} }
.synchronous-info { .synchronous-info {
display: flex; display: flex;
gap: var(--spacing-s); gap: var(--spacing-s);
margin-top: var(--spacing-s);
margin-top: calc(var(--spacing-m) * -1);
} }
.fields { .fields {
@ -163,7 +163,7 @@
display: grid; display: grid;
column-gap: var(--spacing-l); column-gap: var(--spacing-l);
row-gap: var(--spacing-s); row-gap: var(--spacing-s);
grid-template-columns: 0.1fr 0.5fr 0.5fr; grid-template-columns: 15% auto auto;
align-items: center; align-items: center;
} }
</style> </style>