From 8b8b45778d99039e8ce056ebce8c37f995dcae1b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 2 Mar 2022 21:01:25 +0100 Subject: [PATCH] fix: application state in UI --- src/routes/applications/[id]/__layout.svelte | 4 ++-- src/routes/applications/[id]/logs/build/index.svelte | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/routes/applications/[id]/__layout.svelte b/src/routes/applications/[id]/__layout.svelte index 3a04337e4..2c979a4ab 100644 --- a/src/routes/applications/[id]/__layout.svelte +++ b/src/routes/applications/[id]/__layout.svelte @@ -86,7 +86,7 @@ async function handleDeploySubmit() { try { const { buildId } = await post(`/applications/${id}/deploy.json`, { ...application }); - return window.location.assign(`/applications/${id}/logs/build?buildId=${buildId}`); + return await goto(`/applications/${id}/logs/build?buildId=${buildId}`); } catch ({ error }) { return errorNotification(error); } @@ -108,7 +108,7 @@ try { loading = true; await post(`/applications/${id}/stop.json`, {}); - return window.location.reload(); + isRunning = false; } catch ({ error }) { return errorNotification(error); } finally { diff --git a/src/routes/applications/[id]/logs/build/index.svelte b/src/routes/applications/[id]/logs/build/index.svelte index f88985265..d81159d9d 100644 --- a/src/routes/applications/[id]/logs/build/index.svelte +++ b/src/routes/applications/[id]/logs/build/index.svelte @@ -51,9 +51,10 @@ build.took = data.builds[0].took; build.since = data.builds[0].since; } + return build; }); - return; + return window.location.reload(); } catch ({ error }) { return errorNotification(error); }