|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<script> |
|
|
|
import { sortBy } from "lodash/fp" |
|
|
|
import { automationStore } from "builderStore" |
|
|
|
import { DropdownMenu, Modal } from "@budibase/bbui" |
|
|
|
import { Button, DropdownMenu, Modal } from "@budibase/bbui" |
|
|
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns" |
|
|
|
import CreateWebhookModal from "../Shared/CreateWebhookModal.svelte" |
|
|
|
|
|
|
|
@ -10,19 +10,19 @@ |
|
|
|
{ |
|
|
|
label: "Trigger", |
|
|
|
value: "TRIGGER", |
|
|
|
icon: "ri-organization-chart", |
|
|
|
icon: "Algorithm", |
|
|
|
disabled: hasTrigger, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Action", |
|
|
|
value: "ACTION", |
|
|
|
icon: "ri-flow-chart", |
|
|
|
icon: "Actions", |
|
|
|
disabled: !hasTrigger, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "Logic", |
|
|
|
value: "LOGIC", |
|
|
|
icon: "ri-filter-line", |
|
|
|
icon: "Filter", |
|
|
|
disabled: !hasTrigger, |
|
|
|
}, |
|
|
|
] |
|
|
|
@ -63,15 +63,15 @@ |
|
|
|
|
|
|
|
<div class="tab-container"> |
|
|
|
{#each tabs as tab, idx} |
|
|
|
<div |
|
|
|
bind:this={anchors[idx]} |
|
|
|
class="tab" |
|
|
|
class:disabled={tab.disabled} |
|
|
|
on:click={tab.disabled ? null : () => onChangeTab(idx)} |
|
|
|
class:active={idx === selectedIndex}> |
|
|
|
{#if tab.icon}<i class={tab.icon} />{/if} |
|
|
|
<span>{tab.label}</span> |
|
|
|
<i class="ri-arrow-down-s-line arrow" /> |
|
|
|
<div bind:this={anchors[idx]}> |
|
|
|
<Button |
|
|
|
size="S" |
|
|
|
quiet |
|
|
|
icon={tab.icon} |
|
|
|
disabled={tab.disabled} |
|
|
|
on:click={tab.disabled ? null : () => onChangeTab(idx)}> |
|
|
|
{tab.label} |
|
|
|
</Button> |
|
|
|
</div> |
|
|
|
{/each} |
|
|
|
</div> |
|
|
|
@ -100,32 +100,6 @@ |
|
|
|
flex-direction: row; |
|
|
|
justify-content: flex-start; |
|
|
|
align-items: center; |
|
|
|
gap: var(--spacing-l); |
|
|
|
min-height: 24px; |
|
|
|
} |
|
|
|
|
|
|
|
.tab { |
|
|
|
color: var(--grey-7); |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
justify-content: flex-start; |
|
|
|
align-items: center; |
|
|
|
gap: var(--spacing-xs); |
|
|
|
font-size: var(--font-size-xs); |
|
|
|
} |
|
|
|
.tab span { |
|
|
|
font-weight: 500; |
|
|
|
user-select: none; |
|
|
|
} |
|
|
|
.tab.active, |
|
|
|
.tab:not(.disabled):hover { |
|
|
|
color: var(--ink); |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
.tab.disabled { |
|
|
|
color: var(--grey-5); |
|
|
|
} |
|
|
|
.tab i:not(:last-child) { |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|