From 8232a7468bbb2b762f203e88022e10ba6e2d0036 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 3 Apr 2022 23:34:17 +0200 Subject: [PATCH] fix: Build log --- src/lib/components/common.ts | 6 ++++++ src/routes/applications/[id]/__layout.svelte | 1 - src/routes/applications/[id]/logs/build/index.svelte | 8 +++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/lib/components/common.ts b/src/lib/components/common.ts index 96ae8fb52..f6d0f232c 100644 --- a/src/lib/components/common.ts +++ b/src/lib/components/common.ts @@ -37,3 +37,9 @@ export function dashify(str: string, options?: any): string { .replace(/-{2,}/g, (m) => (options && options.condense ? '-' : m)) .toLowerCase(); } + +export function changeQueryParams(buildId) { + const queryParams = new URLSearchParams(window.location.search); + queryParams.set('buildId', buildId); + return history.pushState(null, null, '?' + queryParams.toString()); +} diff --git a/src/routes/applications/[id]/__layout.svelte b/src/routes/applications/[id]/__layout.svelte index 7fc969e0d..7b997fae4 100644 --- a/src/routes/applications/[id]/__layout.svelte +++ b/src/routes/applications/[id]/__layout.svelte @@ -88,7 +88,6 @@ try { const { buildId } = await post(`/applications/${id}/deploy.json`, { ...application }); toast.push('Deployment queued.'); - console.log($page.url); if ($page.url.pathname.startsWith(`/applications/${id}/logs/build`)) { return window.location.assign(`/applications/${id}/logs/build?buildId=${buildId}`); } else { diff --git a/src/routes/applications/[id]/logs/build/index.svelte b/src/routes/applications/[id]/logs/build/index.svelte index d50eecd3b..c84f84709 100644 --- a/src/routes/applications/[id]/logs/build/index.svelte +++ b/src/routes/applications/[id]/logs/build/index.svelte @@ -21,7 +21,7 @@