mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 16:02:14 +00:00
UX nits
This commit is contained in:
@@ -74,3 +74,12 @@ export function pathToMeta(path: string): Meta {
|
||||
name: splitted.slice(2).join('/')
|
||||
}
|
||||
}
|
||||
|
||||
export function prettyLanguage(lang: string) {
|
||||
switch (lang) {
|
||||
case 'nativets':
|
||||
return 'Native Typescript'
|
||||
default:
|
||||
return lang.charAt(0).toUpperCase() + lang.slice(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
import type { Writable } from 'svelte/store'
|
||||
import FlowModuleSchemaItem from './FlowModuleSchemaItem.svelte'
|
||||
import InsertModuleButton from './InsertModuleButton.svelte'
|
||||
import { prettyLanguage } from '$lib/common'
|
||||
|
||||
export let mod: FlowModule
|
||||
export let trigger: boolean
|
||||
@@ -154,7 +155,9 @@
|
||||
{bgColor}
|
||||
label={mod.summary ||
|
||||
(`path` in mod.value ? mod.value.path : undefined) ||
|
||||
(mod.value.type === 'rawscript' ? `Inline ${mod.value.language}` : 'To be defined')}
|
||||
(mod.value.type === 'rawscript'
|
||||
? `Inline ${prettyLanguage(mod.value.language)}`
|
||||
: 'To be defined')}
|
||||
>
|
||||
<div slot="icon">
|
||||
{#if mod.value.type === 'rawscript'}
|
||||
|
||||
@@ -29,7 +29,11 @@
|
||||
}
|
||||
|
||||
async function loadInstanceGroups(): Promise<void> {
|
||||
instanceGroups = await GroupService.listInstanceGroups()
|
||||
try {
|
||||
instanceGroups = await GroupService.listInstanceGroups()
|
||||
} catch (e) {
|
||||
instanceGroups = undefined
|
||||
}
|
||||
}
|
||||
|
||||
function handleKeyUp(event: KeyboardEvent) {
|
||||
|
||||
Reference in New Issue
Block a user