diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 1bfddee455fc9..a46744aa7da19 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -154,6 +154,7 @@ no_auth = ["windmill-api/no_auth"] operator = ["dep:windmill-operator"] test_job_debouncing = [] private_registry_test = [] +dev_override = ["windmill-common/dev_override"] # Languages python = ["windmill-worker/python", "windmill-api/python", "windmill-test-utils/python"] rust = ["windmill-worker/rust"] diff --git a/frontend/src/lib/components/InstanceSetting.svelte b/frontend/src/lib/components/InstanceSetting.svelte index 703b833a2fc51..dff859132270f 100644 --- a/frontend/src/lib/components/InstanceSetting.svelte +++ b/frontend/src/lib/components/InstanceSetting.svelte @@ -123,11 +123,19 @@ export async function openCustomerPortal() { opening = true + const newWindow = window.open('', '_blank') try { const url = await SettingService.createCustomerPortalSession({ licenseKey: $values['license_key'] || undefined }) - window.open(url, '_blank') + if (newWindow) { + newWindow.location.href = url + } else { + window.location.href = url + } + } catch (err) { + newWindow?.close() + throw err } finally { opening = false }