mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-07 16:03:21 +00:00
feat(frontend): flow UX overhaul II + go + python support for trigger scripts (#928)
* all * improve all * improve all * fix frontend * fix input picker nits * fix(frontend): Fix Menu display * all * fix all * fix all Co-authored-by: Faton Ramadani <faton.ramadani14@gmail.com>
This commit is contained in:
co-authored by
Faton Ramadani
parent
b935d69aad
commit
802abe7f90
@@ -1,12 +1,67 @@
|
||||
<script lang="ts">
|
||||
import { faPlus } from '@fortawesome/free-solid-svg-icons'
|
||||
import { Menu } from '$lib/components/common'
|
||||
import { faCode, faCodeBranch, faPlus, faRepeat } from '@fortawesome/free-solid-svg-icons'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import Icon from 'svelte-awesome'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
</script>
|
||||
|
||||
<button
|
||||
on:click
|
||||
type="button"
|
||||
class="text-gray-900 bg-white border mx-0.5 border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 font-medium rounded-full text-sm w-6 h-6 flex items-center justify-center"
|
||||
>
|
||||
<Icon data={faPlus} scale={0.8} />
|
||||
</button>
|
||||
<Menu noMinW placement="bottom-start" let:close>
|
||||
<button
|
||||
slot="trigger"
|
||||
type="button"
|
||||
class="text-gray-900 bg-white border mx-0.5 border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 font-medium rounded-full text-sm w-6 h-6 flex items-center justify-center"
|
||||
>
|
||||
<Icon data={faPlus} scale={0.8} />
|
||||
</button>
|
||||
<div class="divide-y divide-gray-100 text-xs w-40">
|
||||
<button
|
||||
class="w-full text-left p-2"
|
||||
on:click={() => {
|
||||
close()
|
||||
dispatch('new', 'script')
|
||||
}}
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
>
|
||||
<Icon data={faCode} scale={0.8} class="mr-1" />
|
||||
Script
|
||||
</button>
|
||||
<button
|
||||
class="w-full text-left p-2"
|
||||
on:click={() => {
|
||||
close()
|
||||
dispatch('new', 'forloop')
|
||||
}}
|
||||
role="menuitem"
|
||||
>
|
||||
<Icon data={faRepeat} scale={0.8} class="mr-1" />
|
||||
For Loop
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="w-full text-left p-2"
|
||||
on:click={() => {
|
||||
close()
|
||||
dispatch('new', 'branchone')
|
||||
}}
|
||||
role="menuitem"
|
||||
>
|
||||
<Icon data={faCodeBranch} scale={0.8} class="mr-1" />
|
||||
Branch to one
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="w-full text-left p-2"
|
||||
on:click={() => {
|
||||
close()
|
||||
dispatch('new', 'branchall')
|
||||
}}
|
||||
role="menuitem"
|
||||
>
|
||||
<Icon data={faCodeBranch} scale={0.8} class="mr-1" />
|
||||
Branch to all
|
||||
</button>
|
||||
</div>
|
||||
</Menu>
|
||||
|
||||
Reference in New Issue
Block a user