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 preAuthStep
|
||||||
export let datasource
|
export let datasource
|
||||||
export let disabled
|
export let disabled
|
||||||
|
export let samePage
|
||||||
|
|
||||||
$: tenantId = $auth.tenantId
|
$: tenantId = $auth.tenantId
|
||||||
</script>
|
</script>
|
||||||
|
@ -25,10 +26,12 @@
|
||||||
ds = resp
|
ds = resp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.open(
|
const url = `/api/global/auth/${tenantId}/datasource/google?datasourceId=${ds._id}&appId=${appId}`
|
||||||
`/api/global/auth/${tenantId}/datasource/google?datasourceId=${ds._id}&appId=${appId}`,
|
if (samePage) {
|
||||||
"_blank"
|
window.location = url
|
||||||
)
|
} else {
|
||||||
|
window.open(url, "_blank")
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<img src={GoogleLogo} alt="google icon" />
|
<img src={GoogleLogo} alt="google icon" />
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
</FancyForm>
|
</FancyForm>
|
||||||
</div>
|
</div>
|
||||||
{#if isGoogle}
|
{#if isGoogle}
|
||||||
<GoogleButton disabled={!isValid} preAuthStep={handleNext} />
|
<GoogleButton disabled={!isValid} preAuthStep={handleNext} samePage />
|
||||||
{:else}
|
{:else}
|
||||||
<Button cta disabled={!isValid} on:click={handleNext}>Connect</Button>
|
<Button cta disabled={!isValid} on:click={handleNext}>Connect</Button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in New Issue