Improve error messsage of Jitsi widget
If openidtoken request fails, show an error. Also render error a bit nicer in generic widget load errors.
This commit is contained in:
parent
2205f0611e
commit
4164df647c
2 changed files with 5 additions and 3 deletions
|
@ -11,7 +11,9 @@
|
||||||
<div class="joinConferencePrompt">
|
<div class="joinConferencePrompt">
|
||||||
<!-- TODO: i18n -->
|
<!-- TODO: i18n -->
|
||||||
<h2>Jitsi Video Conference</h2>
|
<h2>Jitsi Video Conference</h2>
|
||||||
<button type="button" id="joinButton">Join Conference</button>
|
<div id="widgetActionContainer">
|
||||||
|
<button type="button" id="joinButton">Join Conference</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -61,6 +61,7 @@ function processOpenIDMessage(msg) {
|
||||||
break;
|
break;
|
||||||
case 'blocked':
|
case 'blocked':
|
||||||
console.warn('OpenID credentials request was blocked by user.');
|
console.warn('OpenID credentials request was blocked by user.');
|
||||||
|
document.getElementById("widgetActionContainer").innerText = "Failed to load Jitsi widget";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// nothing to do
|
// nothing to do
|
||||||
|
@ -142,8 +143,7 @@ function onWidgetMessage(msg) {
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Error setting up Jitsi widget", e);
|
console.error("Error setting up Jitsi widget", e);
|
||||||
document.getElementById("jitsiContainer").innerText = "Failed to load Jitsi widget";
|
document.getElementById("widgetActionContainer").innerText = "Failed to load Jitsi widget";
|
||||||
switchVisibleContainers();
|
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue