From f5660dbfa306551d634695769707f70c68234ead Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Wed, 16 Oct 2024 13:30:56 -0400 Subject: [PATCH] Split project creation from add-to-project form Fixes #653 --- src/lib/components/forms/EditProject.svelte | 3 + src/lib/components/forms/Projects.svelte | 70 +++++++-------------- 2 files changed, 27 insertions(+), 46 deletions(-) diff --git a/src/lib/components/forms/EditProject.svelte b/src/lib/components/forms/EditProject.svelte index 7f6e6d375..acbd8b946 100644 --- a/src/lib/components/forms/EditProject.svelte +++ b/src/lib/components/forms/EditProject.svelte @@ -34,6 +34,9 @@ Edit project metadata function onSubmit({ submitter }) { submitter.disabled = true; return ({ result, update }) => { + if (result.type === "success") { + dispatch("success", result); + } update(result); dispatch("close"); }; diff --git a/src/lib/components/forms/Projects.svelte b/src/lib/components/forms/Projects.svelte index cb777ec88..556f2bce1 100644 --- a/src/lib/components/forms/Projects.svelte +++ b/src/lib/components/forms/Projects.svelte @@ -5,26 +5,24 @@ because it needs to load all of a user's projects and we don't want to do that everywhere. -->
-
-

{$_("projects.create")}

- - - - -
- {$_("common.more")} … - - -