From 9939a89a92bb0c72e423e6241203aa1750d49011 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Wed, 2 Aug 2023 12:17:00 +0600 Subject: [PATCH] UBER-650 (#3544) Signed-off-by: Denis Bykhov --- .../src/components/IntegrationConnect.svelte | 5 +++-- plugins/gmail-resources/src/components/Connect.svelte | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/calendar-resources/src/components/IntegrationConnect.svelte b/plugins/calendar-resources/src/components/IntegrationConnect.svelte index daee6355d9..56b7cee3e0 100644 --- a/plugins/calendar-resources/src/components/IntegrationConnect.svelte +++ b/plugins/calendar-resources/src/components/IntegrationConnect.svelte @@ -30,7 +30,7 @@ const link = concatLink(calendarUrl, '/signin') const url = new URL(link) url.search = new URLSearchParams({ - redirectURL: window.location.href + redirectURL: (getMetadata(presentation.metadata.FrontUrl) ?? window.location.origin) + window.location.pathname }).toString() const res = await fetch(url.toString(), { @@ -41,7 +41,8 @@ } }) const redirectTo = await res.text() - window.open(redirectTo, '_self') + window.open(redirectTo) + dispatch('close') } diff --git a/plugins/gmail-resources/src/components/Connect.svelte b/plugins/gmail-resources/src/components/Connect.svelte index 0ace682cad..9804580ada 100644 --- a/plugins/gmail-resources/src/components/Connect.svelte +++ b/plugins/gmail-resources/src/components/Connect.svelte @@ -31,7 +31,7 @@ const link = concatLink(gmailUrl, '/signin') const url = new URL(link) url.search = new URLSearchParams({ - redirectURL: window.location.href + redirectURL: (getMetadata(presentation.metadata.FrontUrl) ?? window.location.origin) + window.location.pathname }).toString() const res = await fetch(url.toString(), { @@ -42,7 +42,8 @@ } }) const redirectTo = await res.text() - window.open(redirectTo, '_self') + window.open(redirectTo) + dispatch('close') }