From 28e25ec60dcd73158fa2fff61c439e67478f35a0 Mon Sep 17 00:00:00 2001 From: Guilhem Date: Tue, 13 Jan 2026 20:24:59 +0000 Subject: [PATCH] fix(frontend):fix first draft save (#7552) * Fix first draft save * fix draft low code app save --- .../components/apps/editor/AppEditorHeader.svelte | 9 ++++++++- .../editor/AppEditorHeaderDeployInitialDraft.svelte | 13 +++++++++---- .../components/raw_apps/RawAppEditorHeader.svelte | 9 ++++++++- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte b/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte index 373c6d8b19..db982a311e 100644 --- a/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte +++ b/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte @@ -743,13 +743,20 @@ startIcon={{ icon: Save }} disabled={pathError != ''} on:click={() => saveInitialDraft()} + unifiedSize="md" + variant="accent" > Save initial draft {/snippet} - + {/if} diff --git a/frontend/src/lib/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte b/frontend/src/lib/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte index 9552436e84..fe5a025054 100644 --- a/frontend/src/lib/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte +++ b/frontend/src/lib/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte @@ -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, '_') diff --git a/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte b/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte index b5a3f1aec4..6fab5f00ea 100644 --- a/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte +++ b/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte @@ -620,12 +620,19 @@ startIcon={{ icon: Save }} disabled={pathError != '' || app == undefined} on:click={() => saveInitialDraft()} + unifiedSize="md" + variant="accent" > Save initial draft {/snippet} - + {/if}