mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 00:02:19 +00:00
fix(frontend):fix first draft save (#7552)
* Fix first draft save * fix draft low code app save
This commit is contained in:
@@ -743,13 +743,20 @@
|
||||
startIcon={{ icon: Save }}
|
||||
disabled={pathError != ''}
|
||||
on:click={() => saveInitialDraft()}
|
||||
unifiedSize="md"
|
||||
variant="accent"
|
||||
>
|
||||
Save initial draft
|
||||
</Button>
|
||||
</div>
|
||||
{/snippet}
|
||||
|
||||
<AppEditorHeaderDeployInitialDraft {summary} {appPath} bind:pathError bind:newEditedPath />
|
||||
<AppEditorHeaderDeployInitialDraft
|
||||
bind:summary={$summary}
|
||||
bind:appPath={$appPath}
|
||||
bind:pathError
|
||||
bind:newEditedPath
|
||||
/>
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
{/if}
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
import { Alert } from '$lib/components/common'
|
||||
import Path from '$lib/components/Path.svelte'
|
||||
|
||||
let { summary, appPath, pathError = $bindable(), newEditedPath = $bindable() } = $props()
|
||||
let {
|
||||
summary = $bindable(),
|
||||
appPath = $bindable(),
|
||||
pathError = $bindable(),
|
||||
newEditedPath = $bindable()
|
||||
} = $props()
|
||||
|
||||
let path: Path | undefined = $state(undefined)
|
||||
let dirtyPath = $state(false)
|
||||
@@ -22,11 +27,11 @@
|
||||
onkeydown={(e) => {
|
||||
e.stopPropagation()
|
||||
}}
|
||||
bind:value={$summary}
|
||||
bind:value={summary}
|
||||
onkeyup={() => {
|
||||
if ($appPath == '' && $summary?.length > 0 && !dirtyPath) {
|
||||
if (appPath == '' && summary?.length > 0 && !dirtyPath) {
|
||||
path?.setName(
|
||||
$summary
|
||||
summary
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9_]/g, '_')
|
||||
.replace(/-+/g, '_')
|
||||
|
||||
@@ -620,12 +620,19 @@
|
||||
startIcon={{ icon: Save }}
|
||||
disabled={pathError != '' || app == undefined}
|
||||
on:click={() => saveInitialDraft()}
|
||||
unifiedSize="md"
|
||||
variant="accent"
|
||||
>
|
||||
Save initial draft
|
||||
</Button>
|
||||
</div>
|
||||
{/snippet}
|
||||
<AppEditorHeaderDeployInitialDraft {summary} {appPath} bind:pathError bind:newEditedPath />
|
||||
<AppEditorHeaderDeployInitialDraft
|
||||
bind:summary
|
||||
bind:appPath
|
||||
bind:pathError
|
||||
bind:newEditedPath
|
||||
/>
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user