1
0
Fork 0
mirror of synced 2024-10-03 19:43:32 +13:00

Minor improvement - opening the google authorization in the same tab as onboarding rather than creating a dead tab.

This commit is contained in:
mike12345567 2023-03-31 14:03:34 +01:00
parent 420190f577
commit 8673ed1dae
2 changed files with 8 additions and 5 deletions

View file

@ -6,6 +6,7 @@
export let preAuthStep
export let datasource
export let disabled
export let samePage
$: tenantId = $auth.tenantId
</script>
@ -25,10 +26,12 @@
ds = resp
}
}
window.open(
`/api/global/auth/${tenantId}/datasource/google?datasourceId=${ds._id}&appId=${appId}`,
"_blank"
)
const url = `/api/global/auth/${tenantId}/datasource/google?datasourceId=${ds._id}&appId=${appId}`
if (samePage) {
window.location = url
} else {
window.open(url, "_blank")
}
}}
>
<img src={GoogleLogo} alt="google icon" />

View file

@ -107,7 +107,7 @@
</FancyForm>
</div>
{#if isGoogle}
<GoogleButton disabled={!isValid} preAuthStep={handleNext} />
<GoogleButton disabled={!isValid} preAuthStep={handleNext} samePage />
{:else}
<Button cta disabled={!isValid} on:click={handleNext}>Connect</Button>
{/if}