Files
windmill/frontend/src/lib/components/flows/pickers/FlowScriptPickerQuick.svelte
Guilhem 7c36e554d7 feat(frontend): add quick access menu in flow editor (#4415)
* (frontend) add quick access menu in flow editor

* (frontend) add quick access menu in flow editor

* improve UI

* make design prettier

* add scroll effects

* improve loading preview

* change no items found

* prevent scroll using menu

* change user folder button

* set default integration icon

* reduce column width

* ajust font

* add defaults script button

* add shadow divider

* fix scroll

* add chevron

* Change toogle bar

* Add preprocessor menu

* add handler

* simplify scroll

* fix display

* fix minor issues

* delete useless log

* revert node tree changes

* merge main

* fix z-index issues

* iterate

* fix: improve allowed domains setting for sso

* chore(main): release 1.402.3 (#4458)

* chore(main): release 1.402.3

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>

* improve allowed domains change handling

* send stats when renewing key if last >24h (#4430)

* feat: send stats when renewing key if last >24h

* nits

* fix: sqlx

* nit

* renewal reason

* stats reason

* update ee ref

* Update ee-repo-ref.txt

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>

* fix: skip one migration to avoid using md5 for azure support

* all

* all

* Apply automatic changes

* all

* done?

* nit

* nit

* nit

* nit

* nit noAi if prefilter is not all

* fix shadow

* fix error handler

* fix error handler

* Polishing default script settings

* all

* all

* full

* all

* add deno_core as features

* all

* remove warnings

* all

* npm check

* npm check

* new script script

* nits

* nits item 0

* nits item 0

---------

Co-authored-by: Guilhem Le Mouel <guilhem.le-mouel.ext@altran.com>
Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: HugoCasa <hugo@casademont.ch>
Co-authored-by: Guilhem <guilhem@mbp-de-windmill.home>
2024-10-03 14:15:01 +02:00

57 lines
1.5 KiB
Svelte

<script lang="ts">
import type { SupportedLanguage } from '$lib/common'
import LanguageIcon from '$lib/components/common/languageIcons/LanguageIcon.svelte'
import { sendUserToast } from '$lib/toast'
import { createEventDispatcher } from 'svelte'
import { twMerge } from 'tailwind-merge'
export let label: string
export let lang: SupportedLanguage | 'docker' | 'javascript' | undefined = undefined
export let selected = false
export let eeRestricted: boolean
export let enterpriseLangs: string[] = []
const dispatch = createEventDispatcher()
function handleKeydown(event: KeyboardEvent & { currentTarget: EventTarget & Window }) {
if (selected && event.key === 'Enter') {
click()
}
}
function click() {
if (eeRestricted) {
sendUserToast(
`The languages ${enterpriseLangs.join(', ')} are only available on the enterprise edition`,
true
)
return
}
dispatch('click')
}
</script>
<svelte:window on:keydown={handleKeydown} />
<button
class={twMerge(
'px-3 py-2 gap-2 w-full text-left hover:bg-surface-hover flex flex-row items-center transition-all rounded-md',
selected ? 'bg-surface-hover' : ''
)}
on:click={click}
role="menuitem"
>
{#if lang}
<LanguageIcon {lang} width={14} height={14} />
{/if}
<span
class="grow truncate text-left text-2xs font-normal {eeRestricted
? 'text-secondary'
: 'text-primary'}"
>
{label}{#if eeRestricted}&nbsp;(EE){/if}
</span>
{#if selected}
<kbd class="!text-xs">&crarr;</kbd>
{/if}
</button>