Skip to content

Commit d328f1d

Browse files
committed
Update authorization-property-editor.element.ts
- Minor update
1 parent a922822 commit d328f1d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Umbraco.Cms.Integrations.Crm.Dynamics/Client/src/config/authorization/authorization-property-editor.element.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ export class DynamicsAuthorizationElement extends UmbElementMixin(LitElement){
6262
const { data } = await this.#dynamicsContext.getAuthorizationUrl();
6363
if (!data) return;
6464

65-
window.open(data, "Authorize", "width=900,height=700,modal=yes,alwaysRaised=yes");
65+
const authWindow = window.open(data, "Authorize", "width=900,height=700,modal=yes,alwaysRaised=yes");
66+
this._loading = true;
67+
68+
setTimeout(() => {
69+
if(authWindow?.closed){
70+
this._loading = false;
71+
}
72+
}, 3000);
6673

6774
window.addEventListener("message", async (event: MessageEvent) => {
6875
if (event.data.type === "dynamics:oauth:success") {

0 commit comments

Comments
 (0)