mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-08 08:04:25 +00:00
fix inline script update effect
This commit is contained in:
+13
-5
@@ -63,11 +63,16 @@
|
||||
return schema
|
||||
}
|
||||
|
||||
$: inlineScript &&
|
||||
(inlineScript.path = `${defaultIfEmptyString(
|
||||
$appPath,
|
||||
`u/${$userStore?.username ?? 'unknown'}/newapp`
|
||||
)}/${name?.replaceAll(' ', '_')}`)
|
||||
$: name && onNameChange()
|
||||
|
||||
function onNameChange() {
|
||||
if (inlineScript) {
|
||||
inlineScript.path = `${defaultIfEmptyString(
|
||||
$appPath,
|
||||
`u/${$userStore?.username ?? 'unknown'}/newapp`
|
||||
)}/${name?.replaceAll(' ', '_')}`
|
||||
}
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
if (inlineScript && !inlineScript.schema) {
|
||||
@@ -85,6 +90,9 @@
|
||||
if (inlineScript?.language == 'frontend' && inlineScript.content) {
|
||||
inferSuggestions(inlineScript.content)
|
||||
}
|
||||
if (!inlineScript?.path) {
|
||||
onNameChange()
|
||||
}
|
||||
})
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
Reference in New Issue
Block a user