Minor improvement - opening the google authorization in the same tab as onboarding rather than creating a dead tab.
This commit is contained in:
parent
420190f577
commit
8673ed1dae
|
@ -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" />
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue