mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 16:02:19 +00:00
fix: make path changeable even if linked to summary
This commit is contained in:
@@ -264,17 +264,6 @@
|
||||
}
|
||||
|
||||
let path: Path | undefined = undefined
|
||||
$: {
|
||||
if (initialPath == '' && script.summary?.length > 0) {
|
||||
path?.setName(
|
||||
script.summary
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9_]/g, '_')
|
||||
.replace(/-+/g, '_')
|
||||
.replace(/^-|-$/g, '')
|
||||
)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:window on:keydown={onKeyDown} />
|
||||
@@ -289,6 +278,18 @@
|
||||
autofocus
|
||||
bind:value={script.summary}
|
||||
placeholder="Short summary to be displayed when listed"
|
||||
on:keydown={() => {
|
||||
if (initialPath == '' && script.summary?.length > 0) {
|
||||
console.log('FOO')
|
||||
path?.setName(
|
||||
script.summary
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9_]/g, '_')
|
||||
.replace(/-+/g, '_')
|
||||
.replace(/^-|-$/g, '')
|
||||
)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<h2 class="border-b pb-1 mt-10 mb-4">Path</h2>
|
||||
<Path
|
||||
|
||||
@@ -40,17 +40,6 @@
|
||||
}
|
||||
|
||||
let path: Path | undefined = undefined
|
||||
$: {
|
||||
if (initialPath == '' && $flowStore.summary?.length > 0) {
|
||||
path?.setName(
|
||||
$flowStore.summary
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9_]/g, '_')
|
||||
.replace(/-+/g, '_')
|
||||
.replace(/^-|-$/g, '')
|
||||
)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="h-full overflow-hidden">
|
||||
@@ -75,6 +64,17 @@
|
||||
bind:value={$flowStore.summary}
|
||||
placeholder="Short summary to be displayed when listed"
|
||||
id="flow-summary"
|
||||
on:keydown={() => {
|
||||
if (initialPath == '' && $flowStore.summary?.length > 0) {
|
||||
path?.setName(
|
||||
$flowStore.summary
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9_]/g, '_')
|
||||
.replace(/-+/g, '_')
|
||||
.replace(/^-|-$/g, '')
|
||||
)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user