Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🩹(addon) show fallback message when dialog cannot auto-close

lebaudantoinef777f2fdeb9a
diff --git a/src/addons/outlook/src/success/success.html b/src/addons/outlook/src/success/success.html
index 2ac114b3..d1603e88 100644
--- a/src/addons/outlook/src/success/success.html
+++ b/src/addons/outlook/src/success/success.html
@@ -40,5 +40,8 @@
</svg>
</span>
</div>
+ <p id="close-msg" style="display: none; text-align: center; font-size: 13px; color: #666; margin-top: 16px;">
+ Si cette fenêtre ne se ferme pas toute seule, veuillez la fermer manuellement.
+ </p>
</body>
</html>
diff --git a/src/addons/outlook/src/success/success.js b/src/addons/outlook/src/success/success.js
index 0c2da273..ccd0082d 100644
--- a/src/addons/outlook/src/success/success.js
+++ b/src/addons/outlook/src/success/success.js
@@ -11,10 +11,18 @@ if (!transitToken) {
window.close();
} else {
exchangeSession(transitToken)
+ .then(() => {
+ document.querySelector(".spinner-container").style.display = "none";
+ document.querySelector("#close-msg").style.display = "block";
+ })
.catch((e) => {
console.error(`Error occured: ${e}`);
})
.finally(() => {
+ // NOTE: doesn't work with the desktop client — the browser considers
+ // this window wasn't opened by this script (it was opened externally),
+ // so it blocks window.close() for security reasons. The "#close-msg"
+ // shown above is the fallback for that case.g
window.close();
});
}