From 4164df647ca99bd57cb74f8268d5f49cb7f4babe Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Mon, 7 Sep 2020 19:51:16 +0300 Subject: [PATCH] Improve error messsage of Jitsi widget If openidtoken request fails, show an error. Also render error a bit nicer in generic widget load errors. --- src/vector/jitsi/index.html | 4 +++- src/vector/jitsi/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vector/jitsi/index.html b/src/vector/jitsi/index.html index b9fc950e15..1259eb1c4a 100644 --- a/src/vector/jitsi/index.html +++ b/src/vector/jitsi/index.html @@ -11,7 +11,9 @@

Jitsi Video Conference

- +
+ +
diff --git a/src/vector/jitsi/index.ts b/src/vector/jitsi/index.ts index 3fe0aa3011..ba24451feb 100644 --- a/src/vector/jitsi/index.ts +++ b/src/vector/jitsi/index.ts @@ -61,6 +61,7 @@ function processOpenIDMessage(msg) { break; case 'blocked': console.warn('OpenID credentials request was blocked by user.'); + document.getElementById("widgetActionContainer").innerText = "Failed to load Jitsi widget"; break; default: // nothing to do @@ -142,8 +143,7 @@ function onWidgetMessage(msg) { } } catch (e) { console.error("Error setting up Jitsi widget", e); - document.getElementById("jitsiContainer").innerText = "Failed to load Jitsi widget"; - switchVisibleContainers(); + document.getElementById("widgetActionContainer").innerText = "Failed to load Jitsi widget"; } })();