Skip to content

Commit f91e4bb

Browse files
authored
Cloud check to hide Update action (#2525)
* Cloud check to hide update * Use store
1 parent eb2724d commit f91e4bb

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

Diff for: src/lib/components/workflow-actions.svelte

+14-11
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import SplitButton from '$lib/holocene/split-button.svelte';
1313
import Tooltip from '$lib/holocene/tooltip.svelte';
1414
import { translate } from '$lib/i18n/translate';
15+
import { isCloud } from '$lib/stores/advanced-visibility';
1516
import { coreUserStore } from '$lib/stores/core-user';
1617
import { resetEvents } from '$lib/stores/events';
1718
import { refresh } from '$lib/stores/workflow-run';
@@ -145,18 +146,20 @@
145146
menuLabel={translate('workflows.workflow-actions')}
146147
>
147148
{#each workflowActions as { onClick, destructive, label, enabled, testId, description }}
148-
{#if destructive}
149-
<MenuDivider />
149+
{#if !$isCloud || ($isCloud && testId !== 'update-button')}
150+
{#if destructive}
151+
<MenuDivider />
152+
{/if}
153+
<MenuItem
154+
on:click={onClick}
155+
{destructive}
156+
disabled={!enabled}
157+
data-testid={testId}
158+
{description}
159+
>
160+
{label}
161+
</MenuItem>
150162
{/if}
151-
<MenuItem
152-
on:click={onClick}
153-
{destructive}
154-
disabled={!enabled}
155-
data-testid={testId}
156-
{description}
157-
>
158-
{label}
159-
</MenuItem>
160163
{/each}
161164
{#if !workflowCreateDisabled($page)}
162165
<MenuDivider />

0 commit comments

Comments
 (0)