mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 00:02:23 +00:00
fix expandable not visible in preview (#7032)
This commit is contained in:
@@ -506,25 +506,11 @@
|
||||
<Move size={12} />
|
||||
</button>
|
||||
{/if}
|
||||
{#if maximizeSubflow !== undefined && (hover || selected)}
|
||||
<button
|
||||
title="Expand subflow"
|
||||
class={twMerge(
|
||||
'center-center text-secondary shadow-sm bg-surface duration-0 hover:bg-surface-accent-hover hover:text-white p-1',
|
||||
selected || hover ? 'block' : '!hidden',
|
||||
'group-hover:block',
|
||||
'shadow-md rounded-md'
|
||||
)}
|
||||
onclick={(e) => {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
|
||||
maximizeSubflow?.()
|
||||
}}
|
||||
>
|
||||
<Maximize2 size={12} />
|
||||
</button>
|
||||
{#if maximizeSubflow !== undefined && (hover || selected)}
|
||||
{@render buttonMaximizeSubflow?.()}
|
||||
{/if}
|
||||
|
||||
<button
|
||||
class={twMerge(
|
||||
'trash center-center text-secondary shadow-sm bg-surface duration-0 hover:bg-red-400 hover:text-white p-1',
|
||||
@@ -570,6 +556,12 @@
|
||||
<TriangleAlert size={12} strokeWidth={2} />
|
||||
</Popover>
|
||||
{/if}
|
||||
{:else if maximizeSubflow !== undefined}
|
||||
<div
|
||||
class="absolute -translate-y-[100%] top-2 right-10 flex flex-row gap-1 p-1 min-w-[52px] h-7 justify-end"
|
||||
>
|
||||
{@render buttonMaximizeSubflow?.()}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -631,6 +623,25 @@
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#snippet buttonMaximizeSubflow()}
|
||||
<button
|
||||
title="Expand subflow"
|
||||
class={twMerge(
|
||||
'center-center text-secondary shadow-sm bg-surface duration-0 hover:bg-surface-accent-hover hover:text-white p-1',
|
||||
selected || hover ? 'block' : '!hidden',
|
||||
'group-hover:block',
|
||||
'shadow-md rounded-md'
|
||||
)}
|
||||
onclick={(e) => {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
maximizeSubflow?.()
|
||||
}}
|
||||
>
|
||||
<Maximize2 size={12} />
|
||||
</button>
|
||||
{/snippet}
|
||||
|
||||
<style>
|
||||
.module:hover .trash {
|
||||
display: flex !important;
|
||||
|
||||
Reference in New Issue
Block a user